Register string constants using REGISTER_STRINGL_CONSTANT instead of
REGISTER_STRING_CONSTANT since (a) this will cope with embedded zeros and (b) it'll be fractionally faster. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9373 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1249f48ce0
commit
cb8dd113f2
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@
|
||||||
const char *,
|
const char *,
|
||||||
char [],
|
char [],
|
||||||
const char []
|
const char []
|
||||||
"REGISTER_STRING_CONSTANT(\"$symname\", $value, CONST_CS | CONST_PERSISTENT);";
|
"REGISTER_STRINGL_CONSTANT(\"$symname\", \"$value\", sizeof(\"$value\") - 1, CONST_CS | CONST_PERSISTENT);";
|
||||||
|
|
||||||
%typemap(consttab) SWIGTYPE *,
|
%typemap(consttab) SWIGTYPE *,
|
||||||
SWIGTYPE &,
|
SWIGTYPE &,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue