Fix wrappers generated for global 'char' variables to not include a terminating

zero in the PHP string.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9090 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2006-05-05 14:57:19 +00:00
commit 086d6b0280
2 changed files with 6 additions and 2 deletions

View file

@ -68,8 +68,8 @@
c[0] = $1;
c[1] = 0;
z_var->type = IS_STRING;
z_var->value.str.val = estrdup(c);
z_var->value.str.len = 2;
z_var->value.str.val = estrndup(c, 1);
z_var->value.str.len = 1;
zend_hash_add(&EG(symbol_table), "$1", strlen("$1")+1, (void *)&z_var,
sizeof(zval *), NULL);
}