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;
|
force=0;
|
||||||
if (arg1==NULL) {
|
if (arg1==NULL) {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
ptr=new $*1_ltype;
|
ptr=new $*1_ltype();
|
||||||
#else
|
#else
|
||||||
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ INT_TYPEMAP(unsigned long long);
|
||||||
force=0;
|
force=0;
|
||||||
if (arg1==NULL) {
|
if (arg1==NULL) {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
ptr=new $*1_ltype;
|
ptr=new $*1_ltype();
|
||||||
#else
|
#else
|
||||||
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
ptr=($*1_ltype) calloc(1,sizeof($*1_ltype));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue