From 8a58711ab61ba62e10c87e7a1d873c38ff0757e0 Mon Sep 17 00:00:00 2001 From: Chad Austin Date: Fri, 8 Mar 2013 15:45:20 -0800 Subject: Throw an error if calling non-const methods on const objects. --- system/include/emscripten/bind.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'system') 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(&MethodInvoker::invoke), sizeof(memberFunction), &memberFunction); @@ -760,6 +762,7 @@ namespace emscripten { methodName, args.count, args.types, + true, reinterpret_cast(&ConstMethodInvoker::invoke), sizeof(memberFunction), &memberFunction); @@ -776,6 +779,7 @@ namespace emscripten { methodName, args.count, args.types, + false, reinterpret_cast(&FunctionInvoker::invoke), sizeof(function), &function); @@ -792,6 +796,7 @@ namespace emscripten { methodName, args.count, args.types, + true, reinterpret_cast(&FunctionInvoker::invoke), sizeof(function), &function); -- cgit v1.2.3-70-g09d2