aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-03-08 15:45:20 -0800
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:25:35 +0300
commit8a58711ab61ba62e10c87e7a1d873c38ff0757e0 (patch)
treefd1d02f081bd7c1af84e0b0a903702a22b104c62 /system
parent88245a330e2db841f1eca2b49eae7e00e1292260 (diff)
Throw an error if calling non-const methods on const objects.
Diffstat (limited to 'system')
-rwxr-xr-xsystem/include/emscripten/bind.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 1923013f..bdcde625 100755
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -124,6 +124,7 @@ namespace emscripten {
const char* methodName,
unsigned argCount,
TYPEID argTypes[],
+ bool isConst,
GenericFunction invoker,
size_t memberFunctionSize,
void* memberFunction);
@@ -744,6 +745,7 @@ namespace emscripten {
methodName,
args.count,
args.types,
+ false,
reinterpret_cast<GenericFunction>(&MethodInvoker<ClassType, ReturnType, Args...>::invoke),
sizeof(memberFunction),
&memberFunction);
@@ -760,6 +762,7 @@ namespace emscripten {
methodName,
args.count,
args.types,
+ true,
reinterpret_cast<GenericFunction>(&ConstMethodInvoker<ClassType, ReturnType, Args...>::invoke),
sizeof(memberFunction),
&memberFunction);
@@ -776,6 +779,7 @@ namespace emscripten {
methodName,
args.count,
args.types,
+ false,
reinterpret_cast<GenericFunction>(&FunctionInvoker<ClassType, ReturnType, Args...>::invoke),
sizeof(function),
&function);
@@ -792,6 +796,7 @@ namespace emscripten {
methodName,
args.count,
args.types,
+ true,
reinterpret_cast<GenericFunction>(&FunctionInvoker<ClassType, ReturnType, Args...>::invoke),
sizeof(function),
&function);