Use ZVAL_STRINGL instead of ZVAL_STRING to set funcname as we know the length at swig-time
This commit is contained in:
parent
a16dc29046
commit
24ff00690f
1 changed files with 2 additions and 1 deletions
|
|
@ -2597,7 +2597,8 @@ done:
|
|||
}
|
||||
Printf(w->code, "zval *%s, funcname;\n", Swig_cresult_name());
|
||||
Printf(w->code, "MAKE_STD_ZVAL(%s);\n", Swig_cresult_name());
|
||||
Printf(w->code, "ZVAL_STRING(&funcname, (char *)\"%s\", 0);\n", GetChar(n, "sym:name"));
|
||||
const char * funcname = GetChar(n, "sym:name");
|
||||
Printf(w->code, "ZVAL_STRINGL(&funcname, (char *)\"%s\", %d, 0);\n", funcname, strlen(funcname));
|
||||
Append(w->code, "if (!swig_self) {\n");
|
||||
Append(w->code, " SWIG_PHP_Error(E_ERROR, \"this pointer is NULL\");");
|
||||
Append(w->code, "}\n\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue