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/SWIG@9090 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
96e1a067b4
commit
092f3a3806
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,10 @@
|
|||
Version 1.3.30 (in progress)
|
||||
============================
|
||||
|
||||
05/05/2006: olly
|
||||
[php] Fix wrappers generated for global 'char' variables to not
|
||||
include a terminating zero in the PHP string.
|
||||
|
||||
05/03/2006: wsfulton
|
||||
Modify typemaps so that char * can be applied to unsigned char * or signed char *
|
||||
types and visa versa.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue