summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-04-13 15:54:25 +1200
committerOlly Betts <olly@survex.com>2021-04-13 16:53:52 +1200
commit836258b9d33c30a70fdd33504d9ca75bb8ba5440 (patch)
treea83f23451444c270cfbfb3056e473f7257069a21 /Source
parent37f575b7b418e7b2fc5b690bdcf329d4abbdeb7b (diff)
downloadswig-836258b9d33c30a70fdd33504d9ca75bb8ba5440.tar.gz
Fix some cases of converting PHP NULL to C++ NULL
Fixes testcase overload_null for PHP 8.0
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/php.cxx7
1 files changed, 0 insertions, 7 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 957eb5143..c4e746a8b 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -1354,7 +1354,6 @@ public:
String *paramType_class = NULL;
bool paramType_valid = is_class(pt);
- SwigType *resolved = SwigType_typedef_resolve_all(pt);
if (paramType_valid) {
paramType_class = get_class_name(pt);
@@ -1365,15 +1364,9 @@ public:
Replaceall(tm, "$source", source);
Replaceall(tm, "$target", ln);
Replaceall(tm, "$input", source);
- if (paramType_valid) {
- String *param_value = NewStringf("SWIG_Z_FETCH_OBJ_P(&%s)->ptr", source);
- Replaceall(tm, "$obj_value", param_value);
- Delete(param_value);
- }
Replaceall(tm, "$needNewFlow", paramType_valid ? (is_class_wrapped(paramType_class) ? "1" : "0") : "0");
String *temp_obj = NewStringEmpty();
Printf(temp_obj, "&%s", ln);
- Replaceall(tm, "$obj_value", is_param_type_pointer(resolved ? resolved : pt) ? "NULL" : temp_obj); // Adding this to compile. It won't reach this if $obj_val is required.
Setattr(p, "emit:input", source);
Printf(f->code, "%s\n", tm);
if (i == 0 && Getattr(p, "self")) {