diff options
author | Chad Austin <chad@imvu.com> | 2013-04-03 17:28:11 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:27:18 +0300 |
commit | d4bf6fbe297ea7e5720b49bfa6fc58b696540144 (patch) | |
tree | ae9490c3bb37aef5afa0a4f9c25ee5b05edd8a6c /src/embind/embind.js | |
parent | 616b5c3579556c5e1be6ba1063c132680d9e2d43 (diff) |
Add support for global constants.
Diffstat (limited to 'src/embind/embind.js')
-rwxr-xr-x | src/embind/embind.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index e050d3c2..46fdeee4 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -1245,3 +1245,15 @@ function __embind_register_interface( }); } +function __embind_register_constant(name, type, value, destructor) { + name = Pointer_stringify(name); + whenDependentTypesAreResolved([], [type], function(type) { + type = type[0]; + /*global console*/ + //console.log('type', type); + //console.log('value', value); + Module[name] = type.fromWireType(value); + // todo: I need to natively destruct 'value' here + return []; + }); +} |