Consistent memory initialization in php typemaps.
Memory was only initialized in C and not C++ - potential bug?
This commit is contained in:
parent
1ba48ceb99
commit
4b23f5d9d4
2 changed files with 2 additions and 2 deletions
|
|
@ -170,7 +170,7 @@
|
|||
force=0;
|
||||
if (arg1==NULL) {
|
||||
#ifdef __cplusplus
|
||||
ptr=new $*1_ltype;
|
||||
ptr=new $*1_ltype();
|
||||
#else
|
||||
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ INT_TYPEMAP(unsigned long long);
|
|||
force=0;
|
||||
if (arg1==NULL) {
|
||||
#ifdef __cplusplus
|
||||
ptr=new $*1_ltype;
|
||||
ptr=new $*1_ltype();
|
||||
#else
|
||||
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue