[js] Remove code to handle v8 < 5.0
We require at least node v6 which means v8 5.0, so code to handle older v8 is no longer useful.
This commit is contained in:
parent
e30dfeaab9
commit
7c97bd5ab3
7 changed files with 10 additions and 463 deletions
|
|
@ -7,36 +7,8 @@
|
|||
// ----------------
|
||||
//
|
||||
// v8 added version macros V8_MAJOR_VERSION, V8_MINOR_VERSION, V8_BUILD_NUMBER
|
||||
// and V8_PATCH_LEVEL in version 4.3.0. SWIG generated code uses these if
|
||||
// they are defined - to support earlier versions you can specify the V8 version
|
||||
// in use via the command line when you run SWIG:
|
||||
//
|
||||
// swig -c++ -javascript -v8 -DV8_VERSION=0x032530 example.i
|
||||
//
|
||||
// Or code in the interface file using SWIG_V8_VERSION:
|
||||
//
|
||||
// %begin %{#define SWIG_V8_VERSION 0x031110%}
|
||||
//
|
||||
// This is specified as a hex constant, but the constant is read as pairs of
|
||||
// decimal digits, so for V8 3.25.30 use constant 0x032530. This scheme can't
|
||||
// represent components > 99, but this constant is only useful for V8 < 4.3.0,
|
||||
// and no V8 versions from that era had a component > 99.
|
||||
|
||||
%define %swig_v8_define_version(version)
|
||||
%insert("runtime") %{
|
||||
#ifndef SWIG_V8_VERSION
|
||||
#define SWIG_V8_VERSION version
|
||||
#endif
|
||||
%}
|
||||
%enddef
|
||||
|
||||
#ifdef V8_VERSION
|
||||
%swig_v8_define_version(V8_VERSION)
|
||||
#else
|
||||
// HACK: defining a default version
|
||||
%swig_v8_define_version(0x031110)
|
||||
#endif
|
||||
|
||||
// and V8_PATCH_LEVEL in version 4.3.0. SWIG doesn't support anything that
|
||||
// old so SWIG generated code can rely on these.
|
||||
|
||||
// Node support
|
||||
// ------------
|
||||
|
|
@ -56,13 +28,11 @@
|
|||
%insert(runtime) %{
|
||||
#include <v8.h>
|
||||
|
||||
#if defined(V8_MAJOR_VERSION) && defined(V8_MINOR_VERSION)
|
||||
#undef SWIG_V8_VERSION
|
||||
#define SWIG_V8_VERSION ((V8_MAJOR_VERSION / 10) * 4096 + \
|
||||
(V8_MAJOR_VERSION % 10) * 256 + \
|
||||
(V8_MINOR_VERSION / 10) * 16 + \
|
||||
(V8_MINOR_VERSION % 10))
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue