| Index: nacl_bindings_generator/generate_nacl_bindings.py
|
| diff --git a/nacl_bindings_generator/generate_nacl_bindings.py b/nacl_bindings_generator/generate_nacl_bindings.py
|
| index e06ffa91188d18863f79fb27e150e8144c3154f3..d3748232f78e4764b6108e1dc8b9daa9c62c50df 100755
|
| --- a/nacl_bindings_generator/generate_nacl_bindings.py
|
| +++ b/nacl_bindings_generator/generate_nacl_bindings.py
|
| @@ -307,11 +307,27 @@ def GenerateMojoSyscall(functions, common_vars, out):
|
| code.PushMargin()
|
|
|
| for f in functions:
|
| + is_implemented = True
|
| +
|
| + # Mojo API calls that take or return pointers are currently not supported.
|
| + # The underlying Mojo implementation is unaware of NaCl's address space. In
|
| + # addition, if we pass blindly pass the parameters through to the underlying
|
| + # Mojo API, memory corruption can result from pointer-size mistmatches.
|
| + for p in f.params:
|
| + if p.base_type.endswith("*"):
|
| + is_implemented = False
|
| +
|
| impls = [ImplForParam(p) for p in f.params]
|
| impls.append(ImplForParam(f.result_param))
|
|
|
| code << 'case %d:' % f.uid
|
|
|
| + if not is_implemented:
|
| + with code.Indent():
|
| + code << 'fprintf(stderr, "%s not implemented\\n");' % f.name
|
| + code << 'return -1;'
|
| + continue
|
| +
|
| code.PushMargin()
|
|
|
| code << '{'
|
|
|