diff options
author | Chad Austin <chad@imvu.com> | 2013-03-20 13:52:09 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:26:25 +0300 |
commit | 41b65f63c49bdbdc185d108885ea1c791994c99a (patch) | |
tree | 37dec9f67c4f87ab3f04de7e55abbf851f9d70cb | |
parent | 46d7a60c3bf776b2994d091f2308ac777540f40c (diff) |
Fix a bug in embind when using const return values
-rwxr-xr-x | system/include/emscripten/wire.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/include/emscripten/wire.h b/system/include/emscripten/wire.h index 3e4a77d9..0c0f5eb8 100755 --- a/system/include/emscripten/wire.h +++ b/system/include/emscripten/wire.h @@ -182,6 +182,17 @@ namespace emscripten { }; template<typename T> + struct BindingType<const T> { + typedef typename BindingType<T>::WireType WireType; + static WireType toWireType(const T& v) { + return BindingType<T>::toWireType(v); + } + static T fromWireType(WireType wt) { + return BindingType<T>::fromWireType(wt); + } + }; + + template<typename T> struct BindingType<const T&> { typedef typename BindingType<T>::WireType WireType; static WireType toWireType(const T& v) { |