Fix std::string support for v8.
This commit is contained in:
parent
2c4a90a37d
commit
9d630ab930
3 changed files with 60 additions and 59 deletions
|
|
@ -2,7 +2,7 @@
|
|||
/* ------------------------------------------------------------
|
||||
* utility methods for char strings
|
||||
* ------------------------------------------------------------ */
|
||||
%fragment("SWIG_AsCharPtrAndSize","header",fragment="SWIG_pchar_descriptor") {
|
||||
%fragment("SWIG_AsCharPtrAndSize", "header", fragment="SWIG_pchar_descriptor") {
|
||||
SWIGINTERN int
|
||||
SWIG_AsCharPtrAndSize(v8::Handle<v8::Value> valRef, char** cptr, size_t* psize, int *alloc)
|
||||
{
|
||||
|
|
@ -47,9 +47,6 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
|||
if (carray) {
|
||||
if (size > INT_MAX) {
|
||||
// TODO: handle extra long strings
|
||||
//swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
|
||||
//return pchar_descriptor ?
|
||||
// SWIG_InternalNewPointerObj(%const_cast(carray,char *), pchar_descriptor, 0) : SWIG_Py_Void();
|
||||
return v8::Undefined();
|
||||
} else {
|
||||
v8::Handle<v8::String> js_str = v8::String::New(carray, size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue