From cb8dd113f273dc24978b965b1189e7e0a632e741 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Thu, 28 Sep 2006 06:42:36 +0000 Subject: [PATCH] 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 --- SWIG/Lib/php4/const.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SWIG/Lib/php4/const.i b/SWIG/Lib/php4/const.i index 4ea378fe1..2b933e8ae 100644 --- a/SWIG/Lib/php4/const.i +++ b/SWIG/Lib/php4/const.i @@ -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 &,