summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-12-24 18:33:24 +1300
committerOlly Betts <olly@survex.com>2022-01-19 16:41:59 +1300
commit27b1644b270c57a1b99bf71491f4bf0fbf265a95 (patch)
tree1df79d5b5a75745bc0c55253023f3b9c63daaadc
parent5638360a49108a2ebc2027730931608b52710ba6 (diff)
downloadswig-27b1644b270c57a1b99bf71491f4bf0fbf265a95.tar.gz
Add FIXME comment
-rw-r--r--Source/Modules/php.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index dc9cc4dd8..5cf781a8d 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -2329,6 +2329,17 @@ void PHPTypes::process_phptype(Node *n, int key, const String_or_char *attribute
} else {
// SWIG wraps a pointer to a non-object type as an object in a PHP
// class named based on the SWIG-mangled C/C++ type.
+ //
+ // FIXME: We should check this is actually a known pointer to
+ // non-object type so we complain about `phptype="SWIGTYPE"` being
+ // used for PHP types like `int` or `string` (currently this only
+ // fails at runtime and the error isn't very helpful). We could
+ // check the condition
+ //
+ // zend_types && Getattr(zend_types, SwigType_manglestr(type))
+ //
+ // except that zend_types may not have been fully filled in when
+ // we are called.
Append(merge_list, NewStringf("SWIG\\%s", SwigType_manglestr(type)));
}
} else {