diff options
author | Olly Betts <olly@survex.com> | 2021-04-17 07:39:41 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-04-17 07:39:41 +1200 |
commit | e76308be92e747da1baac7d582e0dd0d180fd061 (patch) | |
tree | cad26e2d2c38d50ca3b6550c89e7cb963bb3165b | |
parent | 3e4b7b33689769ef37cd23740615726bb62bfbe9 (diff) | |
download | swig-e76308be92e747da1baac7d582e0dd0d180fd061.tar.gz |
Simplify globalvariableHandler() further
-rw-r--r-- | Source/Modules/php.cxx | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index fd99e8d60..a98c0d93a 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -108,7 +108,6 @@ static enum { memberfn, staticmemberfn, membervar, - globalvar, staticmembervar, constructor, directorconstructor @@ -1140,18 +1139,6 @@ public: } } else if (wrapperType == memberfn) { wname = Getattr(n, "memberfunctionHandler:sym:name"); - } else if (wrapperType == globalvar) { - //check for namespaces (global class vars) - if (class_name) { - wname = Copy(Getattr(n, "variableWrapper:sym:name")); - if (is_setter_method(n)) { - Append(wname, "_set"); - } else if (is_getter_method(n)) { - Append(wname, "_get"); - } - } else { - wname = iname; - } } else if (wrapperType == staticmembervar) { // Shape::nshapes -> nshapes wname = Getattr(n, "staticmembervariableHandler:sym:name"); @@ -1501,19 +1488,13 @@ public: * globalvariableHandler() * ------------------------------------------------------------ */ - virtual int globalvariableHandler(Node *n) { - wrapperType = globalvar; - - /* PHP doesn't support intercepting reads and writes to global variables - * (nor static property reads and writes so we can't wrap them as static - * properties on a dummy class) so just let SWIG do its default thing and - * wrap them as name_get() and name_set(). - */ - int result = Language::globalvariableHandler(n); - - wrapperType = standard; - return result; - } + /* PHP doesn't support intercepting reads and writes to global variables + * (nor static property reads and writes so we can't wrap them as static + * properties on a dummy class) so just let SWIG do its default thing and + * wrap them as name_get() and name_set(). + */ + //virtual int globalvariableHandler(Node *n) { + //} /* ------------------------------------------------------------ * constantWrapper() |