Skip to content

Commit 5ff0bb4

Browse files
committed
Support for swig 4.1.0
In swig 4.1.0, the complicated handling of "SWIG_V8_VERSION" has been cleaned up a bit. I made the same changes as in this swig. Signed-off-by: Hirokazu MORIKAWA <[email protected]>
1 parent 3f7dcc6 commit 5ff0bb4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/carrays_uint32_t.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
%typemap(in) uint32_t {
2525
int ecode2 = 0 ;
2626
if (($input)->IsInt32())
27+
%#if (V8_MAJOR_VERSION-0) < 7
2728
$1 = ($input)->Uint32Value();
29+
%#else
30+
$1 = ($input)->Uint32Value(SWIGV8_CURRENT_CONTEXT()).FromJust();
31+
%#endif
2832
else
2933
SWIG_exception_fail(SWIG_ArgError(ecode2), "failed to convert uint32");
3034
}

src/common_top.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void cleanUp()
2727
/* Call the v8 garbage collector as long as there is memory to clean up
2828
* See https://codereview.chromium.org/412163003 for this API change
2929
*/
30-
#if (SWIG_V8_VERSION < 0x032838)
30+
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032838)
3131
while (!v8::V8::IdleNotificationDeadline())
3232
#else
3333
while (!v8::Isolate::GetCurrent()->IdleNotificationDeadline(1000))

0 commit comments

Comments
 (0)