summaryrefslogtreecommitdiff
path: root/Lib/javascript/v8/javascriptstrings.swg
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-12-02 18:09:30 +1300
committerGitHub <noreply@github.com>2021-12-02 18:09:30 +1300
commit51f586bc4c7bca32dc1a4c2b52770c2a58ad5341 (patch)
tree52f32bab5a8f10bccc1c8509e9d5bad699b78b2e /Lib/javascript/v8/javascriptstrings.swg
parentf17b6bda93cf744ea1afa010ca0f2652cb56e5bd (diff)
parentbebb3d4c21658db58dddc30378a837e97713dd9f (diff)
downloadswig-51f586bc4c7bca32dc1a4c2b52770c2a58ad5341.tar.gz
Merge pull request #2111 from swig/remove-obsolete-js-support
Remove obsolete js support
Diffstat (limited to 'Lib/javascript/v8/javascriptstrings.swg')
-rw-r--r--Lib/javascript/v8/javascriptstrings.swg8
1 files changed, 0 insertions, 8 deletions
diff --git a/Lib/javascript/v8/javascriptstrings.swg b/Lib/javascript/v8/javascriptstrings.swg
index aaf1b9302..8dc2d945e 100644
--- a/Lib/javascript/v8/javascriptstrings.swg
+++ b/Lib/javascript/v8/javascriptstrings.swg
@@ -7,11 +7,7 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(SWIGV8_VALUE valRef, char** cptr, size_t* psize, int *alloc)
{
if(valRef->IsString()) {
-%#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
- v8::Handle<v8::String> js_str = v8::Handle<v8::String>::Cast(valRef);
-%#else
v8::Local<v8::String> js_str = v8::Local<v8::String>::Cast(valRef);
-%#endif
size_t len = SWIGV8_UTF8_LENGTH(js_str) + 1;
char* cstr = (char*) %new_array(len, char);
@@ -53,11 +49,7 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
// TODO: handle extra long strings
return SWIGV8_UNDEFINED();
} else {
-%#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
- v8::Handle<v8::String> js_str = SWIGV8_STRING_NEW2(carray, size);
-%#else
v8::Local<v8::String> js_str = SWIGV8_STRING_NEW2(carray, size);
-%#endif
return js_str;
}
} else {