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/SWIG@9373 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
be148c61b3
commit
57a68af35f
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@
|
|||
const char *,
|
||||
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 *,
|
||||
SWIGTYPE &,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue