Lib/javascript/v8/javascriptrun.swg: clean up pre-processor conditions.

Harmonize javascriptcode.swg javascripthelpers.swg and clarify
documentation.
This commit is contained in:
Andy Polyakov 2021-03-09 15:34:31 +01:00
commit b56814ce08
4 changed files with 27 additions and 33 deletions

View file

@ -444,7 +444,7 @@ fail:
* ----------------------------------------------------------------------------- */
%fragment("jsv8_register_class", "templates")
%{
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
#if (V8_MAJOR_VERSION-0) < 5
$jsparent_obj->Set(SWIGV8_SYMBOL_NEW("$jsname"), $jsmangledname_obj);
#else
SWIGV8_MAYBE_CHECK($jsparent_obj->Set(context, SWIGV8_SYMBOL_NEW("$jsname"), $jsmangledname_obj));
@ -469,7 +469,7 @@ fail:
* ----------------------------------------------------------------------------- */
%fragment("jsv8_register_namespace", "templates")
%{
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
#if (V8_MAJOR_VERSION-0) < 5
$jsparent_obj->Set(SWIGV8_SYMBOL_NEW("$jsname"), $jsmangledname_obj);
#else
SWIGV8_MAYBE_CHECK($jsparent_obj->Set(context, SWIGV8_SYMBOL_NEW("$jsname"), $jsmangledname_obj));