summaryrefslogtreecommitdiff
path: root/Lib/javascript/v8/javascripthelpers.swg
diff options
context:
space:
mode:
authorAndy Polyakov <appro@cryptogams.org>2021-03-09 15:34:31 +0100
committerAndy Polyakov <appro@cryptogams.org>2021-03-10 14:51:08 +0100
commitb56814ce08ff27cc4bd195b427dbe43c7b6e354e (patch)
tree767ec4f1f6c22a93dfaaef9c3477b66349b5979f /Lib/javascript/v8/javascripthelpers.swg
parent0c10c0596f8ae1dc7af439f704f76869618cc6ff (diff)
downloadswig-b56814ce08ff27cc4bd195b427dbe43c7b6e354e.tar.gz
Lib/javascript/v8/javascriptrun.swg: clean up pre-processor conditions.
Harmonize javascriptcode.swg javascripthelpers.swg and clarify documentation.
Diffstat (limited to 'Lib/javascript/v8/javascripthelpers.swg')
-rw-r--r--Lib/javascript/v8/javascripthelpers.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
index 9c3296d82..fdbff000e 100644
--- a/Lib/javascript/v8/javascripthelpers.swg
+++ b/Lib/javascript/v8/javascripthelpers.swg
@@ -62,7 +62,7 @@ SWIGRUNTIME void SWIGV8_AddMemberVariable(SWIGV8_FUNCTION_TEMPLATE class_templ,
*/
SWIGRUNTIME void SWIGV8_AddStaticFunction(SWIGV8_OBJECT obj, const char* symbol,
const SwigV8FunctionCallback& _func, v8::Local<v8::Context> context) {
-#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
+#if (V8_MAJOR_VERSION-0) < 5
obj->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction());
#else
SWIGV8_MAYBE_CHECK(obj->Set(context, SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction(context).ToLocalChecked()));