Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py

Issue 1778753002: Implement MojoGetBufferInformation(), part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py
diff --git a/mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py b/mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py
index 88607ff461c435eb0b6d6b8e2ec79d66bff53557..9b63197f45992e65469d77bcc4f4107185d8242e 100644
--- a/mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py
+++ b/mojo/nacl/sfi/nacl_bindings_generator/interface_dsl.py
@@ -119,6 +119,18 @@ class Param(object):
self.is_output = True
return self
+ # Out extensible structs have an input size indicating the buffer size. On
viettrungluu 2016/03/09 00:51:04 This (and the resulting generated code) should be
Sean Klein 2016/03/09 22:18:22 Seems correct to me. Slightly confusing that it is
+ # success, the size actually written is indicated in the struct.
+ def OutExtensibleStruct(self, ty, size):
+ self.base_type = ty
+ self.param_type = 'struct ' + ty + '*'
+ self.size = size
+ self.is_array = False
+ self.is_output = True
+ self.is_struct = True
+ self.is_extensible = True
+ return self
+
# The size of the struct is fixed by the API, it cannot be extended.
def OutFixedStruct(self, ty):
self.base_type = ty

Powered by Google App Engine
This is Rietveld 408576698