summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-07-23 14:51:10 +1200
committerOlly Betts <olly@survex.com>2022-10-03 12:44:14 +1300
commitc7e1e64538d568ce66c6ac261fb63d2ef9bb2239 (patch)
tree93009dfabba94cf7899558d34671597eb7883564
parent28202a0e272b2646bacfc3a1ab33e6b74d23b703 (diff)
downloadswig-c7e1e64538d568ce66c6ac261fb63d2ef9bb2239.tar.gz
Prefer !Equal() to Cmp() != 0
-rw-r--r--Source/Modules/php.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index e6b9e991a..d392e3a89 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -869,7 +869,7 @@ public:
void create_command(String *cname, String *fname, Node *n, bool dispatch, String *modes = NULL) {
// This is for the single main zend_function_entry record
ParmList *l = Getattr(n, "parms");
- if (cname && Cmp(Getattr(n, "storage"), "friend") != 0) {
+ if (cname && !Equal(Getattr(n, "storage"), "friend")) {
Printf(f_h, "static PHP_METHOD(%s%s,%s);\n", prefix, cname, fname);
if (wrapperType != staticmemberfn &&
wrapperType != staticmembervar &&
@@ -891,7 +891,7 @@ public:
String *arginfo_id = phptypes->get_arginfo_id();
String *s = cs_entry;
if (!s) s = s_entry;
- if (cname && Cmp(Getattr(n, "storage"), "friend") != 0) {
+ if (cname && !Equal(Getattr(n, "storage"), "friend")) {
Printf(all_cs_entry, " PHP_ME(%s%s,%s,swig_arginfo_%s,%s)\n", prefix, cname, fname, arginfo_id, modes);
} else {
if (dispatch) {
@@ -961,7 +961,7 @@ public:
create_command(class_name, wname, n, true, modes);
- if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
+ if (class_name && !Equal(Getattr(n, "storage"), "friend")) {
Printv(f->def, "static PHP_METHOD(", prefix, class_name, ",", wname, ") {\n", NIL);
} else {
Printv(f->def, "static ZEND_NAMED_FUNCTION(", wname, ") {\n", NIL);
@@ -1251,7 +1251,7 @@ public:
if (is_getter_method(n)) {
// This is to overcome types that can't be set and hence no setter.
- if (Cmp(Getattr(n, "feature:immutable"), "1") != 0)
+ if (!Equal(Getattr(n, "feature:immutable"), "1"))
static_getter = true;
}
} else if (wrapperType == staticmemberfn) {
@@ -1329,7 +1329,7 @@ public:
if (!overloaded) {
if (!static_getter) {
- if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
+ if (class_name && !Equal(Getattr(n, "storage"), "friend")) {
Printv(f->def, "static PHP_METHOD(", prefix, class_name, ",", wname, ") {\n", NIL);
} else {
if (wrap_nonclass_global) {