diff options
author | Olly Betts <olly@survex.com> | 2021-12-13 08:53:23 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-12-13 09:27:58 +1300 |
commit | bf68b377e609b81b4bbb81c70769568a46f18484 (patch) | |
tree | ccde498f67cac87577c57f56d94cd1dcc0eb048e | |
parent | 4467c94fe9e4433a376bdaddaa54ad8b4edb5891 (diff) | |
download | swig-bf68b377e609b81b4bbb81c70769568a46f18484.tar.gz |
Remove unused code from PHP backend
These are leftovers from the work on wrapping using only PHP's C API.
-rw-r--r-- | Source/Modules/php.cxx | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index f7decbf3c..f48ab34b9 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -494,7 +494,6 @@ public: * things are being called in the wrong order */ - // Printv(s_init,s_resourcetypes,NIL); Printf(s_oinit, " /* end oinit subsection */\n"); Printf(s_init, "%s\n", s_oinit); @@ -831,31 +830,6 @@ public: * functionWrapper() * ------------------------------------------------------------ */ - /* Helper method for PHP::functionWrapper */ - bool is_class(SwigType *t) { - Node *n = classLookup(t); - if (n) { - String *r = Getattr(n, "php:proxy"); // Set by classDeclaration() - if (!r) - r = Getattr(n, "sym:name"); // Not seen by classDeclaration yet, but this is the name - if (r) - return true; - } - return false; - } - - /* Helper method for PHP::functionWrapper to get class name for parameter*/ - String *get_class_name(SwigType *t) { - Node *n = classLookup(t); - String *r = NULL; - if (n) { - r = Getattr(n, "php:proxy"); // Set by classDeclaration() - if (!r) - r = Getattr(n, "sym:name"); // Not seen by classDeclaration yet, but this is the name - } - return r; - } - /* Helper function to check if class is wrapped */ bool is_class_wrapped(String *className) { if (!className) @@ -864,18 +838,6 @@ public: return n && Getattr(n, "classtype") != NULL; } - /* Is special return type */ - bool is_param_type_pointer(SwigType *t) { - - if (SwigType_ispointer(t) || - SwigType_ismemberpointer(t) || - SwigType_isreference(t) || - SwigType_isarray(t)) - return true; - - return false; - } - void generate_magic_property_methods(Node *class_node, String *base_class) { if (Equal(base_class, "Exception") || !is_class_wrapped(base_class)) { base_class = NULL; @@ -1254,7 +1216,6 @@ public: String *source; /* Skip ignored arguments */ - //while (Getattr(p,"tmap:ignore")) { p = Getattr(p,"tmap:ignore:next");} while (checkAttribute(p, "tmap:in:numinputs", "0")) { p = Getattr(p, "tmap:in:next"); } @@ -1268,14 +1229,6 @@ public: Printf(f->code, "\tif(arg_count > %d) {\n", i); } - String *paramType_class = NULL; - bool paramType_valid = is_class(pt); - - if (paramType_valid) { - paramType_class = get_class_name(pt); - Chop(paramType_class); - } - if ((tm = Getattr(p, "tmap:in"))) { Replaceall(tm, "$input", source); Setattr(p, "emit:input", source); |