Relax type check in SWIG_AsVal_int.
The array_member test-case revealed that integers come in as `Numbers`.
This commit is contained in:
parent
0e78fc0ad7
commit
8778146b4b
2 changed files with 2 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ CPP_TEST_CASES = \
|
||||||
abstract_typedef2 \
|
abstract_typedef2 \
|
||||||
abstract_virtual \
|
abstract_virtual \
|
||||||
arrays_global \
|
arrays_global \
|
||||||
|
array_member \
|
||||||
char_binary \
|
char_binary \
|
||||||
class_ignore \
|
class_ignore \
|
||||||
class_scope_weird \
|
class_scope_weird \
|
||||||
|
|
@ -49,7 +50,6 @@ CPP_TEST_CASES = \
|
||||||
javascript_unicode
|
javascript_unicode
|
||||||
|
|
||||||
BROKEN_TEST_CASES = \
|
BROKEN_TEST_CASES = \
|
||||||
array_member \
|
|
||||||
complextest \
|
complextest \
|
||||||
constructor_copy \
|
constructor_copy \
|
||||||
preproc_include
|
preproc_include
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ v8::Handle<v8::Value> SWIG_From_dec(int)(int value)
|
||||||
SWIGINTERN
|
SWIGINTERN
|
||||||
int SWIG_AsVal_dec(int)(v8::Handle<v8::Value> valRef, int* val)
|
int SWIG_AsVal_dec(int)(v8::Handle<v8::Value> valRef, int* val)
|
||||||
{
|
{
|
||||||
if (!valRef->IsInt32()) {
|
if (!valRef->IsNumber()) {
|
||||||
return SWIG_TypeError;
|
return SWIG_TypeError;
|
||||||
}
|
}
|
||||||
if(val) *val = valRef->IntegerValue();
|
if(val) *val = valRef->IntegerValue();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue