From 4b23f5d9d4030a551eaac55aa910ce909745ae8a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 30 Jul 2015 20:39:52 +0100 Subject: [PATCH] Consistent memory initialization in php typemaps. Memory was only initialized in C and not C++ - potential bug? --- Lib/php/php.swg | 2 +- Lib/php/typemaps.i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/php/php.swg b/Lib/php/php.swg index 8b5fb7be3..05d25a1df 100644 --- a/Lib/php/php.swg +++ b/Lib/php/php.swg @@ -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 diff --git a/Lib/php/typemaps.i b/Lib/php/typemaps.i index ca49ec327..0372884a6 100644 --- a/Lib/php/typemaps.i +++ b/Lib/php/typemaps.i @@ -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