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:
Olly Betts 2006-09-28 06:42:36 +00:00
commit 57a68af35f

View file

@ -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 &,