diff options
author | Chad Austin <chad@imvu.com> | 2013-03-14 15:45:44 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:26:02 +0300 |
commit | a09b543bf434b0f5e27b776f7a5a752f3e1c317d (patch) | |
tree | 109b491b984cc8c782a227e120d834685b11561a | |
parent | cb2533c8538eba077c08102ae85f00a1231a14ca (diff) |
make a note that it's sometimes okay to pass raw pointers to smart pointers
-rwxr-xr-x | src/embind/embind.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 0eefef36..d664435f 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -529,6 +529,8 @@ RegisteredPointer.prototype.toWireType = function(destructors, handle) { if (!(handle instanceof this.registeredClass.constructor)) { throwBindingError('Expected null or instance of ' + this.name + ', got ' + IMVU.repr(handle)); } + // TODO: this is not strictly true + // It seems legal to support BY_EMVAL and INTRUSIVE conversions from raw pointers to smart pointers if (this.isSmartPointer && undefined === handle.$$.smartPtr) { throwBindingError('Passing raw pointer to smart pointer is illegal'); } |