Consistent memory initialization in php typemaps.

Memory was only initialized in C and not C++ - potential bug?
This commit is contained in:
William S Fulton 2015-07-30 20:39:52 +01:00
commit 4b23f5d9d4
2 changed files with 2 additions and 2 deletions

View file

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

View file

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