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