Fix previous commit
Revert changes inadvertently included, and fix `=` to `==`.
This commit is contained in:
parent
029ddab8b5
commit
b2c58115d7
20 changed files with 38 additions and 39 deletions
|
|
@ -653,7 +653,7 @@ int Language::includeDirective(Node *n) {
|
|||
|
||||
int Language::insertDirective(Node *n) {
|
||||
/* %insert directive */
|
||||
if (!ImportMode || Getattr(n, "generated")) {
|
||||
if ((!ImportMode) || Getattr(n, "generated")) {
|
||||
String *code = Getattr(n, "code");
|
||||
String *section = Getattr(n, "section");
|
||||
File *f = 0;
|
||||
|
|
@ -2703,7 +2703,7 @@ int Language::constructorDeclaration(Node *n) {
|
|||
over = Swig_symbol_isoverloaded(n);
|
||||
if (over)
|
||||
over = first_nontemplate(over);
|
||||
if (over && !overloading) {
|
||||
if ((over) && (!overloading)) {
|
||||
/* If the symbol is overloaded. We check to see if it is a copy constructor. If so,
|
||||
we invoke copyconstructorHandler() as a special case. */
|
||||
if (Getattr(n, "copy_constructor") && (!Getattr(CurrentClass, "has_copy_constructor"))) {
|
||||
|
|
@ -3332,7 +3332,7 @@ Node *Language::classLookup(const SwigType *s) {
|
|||
break;
|
||||
nstab = Getattr(n, "sym:symtab");
|
||||
n = 0;
|
||||
if (!nstab || nstab == stab) {
|
||||
if ((!nstab) || (nstab == stab)) {
|
||||
break;
|
||||
}
|
||||
stab = nstab;
|
||||
|
|
@ -3420,7 +3420,7 @@ Node *Language::enumLookup(SwigType *s) {
|
|||
break;
|
||||
nstab = Getattr(n, "sym:symtab");
|
||||
n = 0;
|
||||
if (!nstab || nstab == stab) {
|
||||
if ((!nstab) || (nstab == stab)) {
|
||||
break;
|
||||
}
|
||||
stab = nstab;
|
||||
|
|
|
|||
|
|
@ -1422,7 +1422,7 @@ public:
|
|||
b = First(baselist);
|
||||
while (b.item) {
|
||||
String *bname = Getattr(b.item, "name");
|
||||
if (!bname || GetFlag(b.item, "feature:ignore") || !Getattr(b.item, "module")) {
|
||||
if ((!bname) || GetFlag(b.item, "feature:ignore") || (!Getattr(b.item, "module"))) {
|
||||
b = Next(b);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1972,7 +1972,7 @@ public:
|
|||
// For the sake of compiling with -Wall -Werror we print constants
|
||||
// only when necessary
|
||||
int need_constants = 0;
|
||||
if ((elua_ltr || eluac_ltr) && old_metatable_bindings)
|
||||
if ( (elua_ltr || eluac_ltr) && (old_metatable_bindings) )
|
||||
need_constants = 1;
|
||||
else if (!is_instance) // static part need constants tab
|
||||
need_constants = 1;
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,7 @@ public:
|
|||
b = First(baselist);
|
||||
while (b.item) {
|
||||
String *bname = Getattr(b.item, "name");
|
||||
if (!bname || GetFlag(b.item, "feature:ignore") || !Getattr(b.item, "module")) {
|
||||
if ((!bname) || GetFlag(b.item, "feature:ignore") || (!Getattr(b.item, "module"))) {
|
||||
b = Next(b);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,12 +158,12 @@ List *Swig_overload_rank(Node *n, bool script_lang_wrapping) {
|
|||
}
|
||||
String *t1 = Getattr(p1, "tmap:typecheck:precedence");
|
||||
String *t2 = Getattr(p2, "tmap:typecheck:precedence");
|
||||
if (!t1 && !nodes[i].error) {
|
||||
if ((!t1) && (!nodes[i].error)) {
|
||||
Swig_warning(WARN_TYPEMAP_TYPECHECK, Getfile(nodes[i].n), Getline(nodes[i].n),
|
||||
"Overloaded method %s not supported (incomplete type checking rule - no precedence level in typecheck typemap for '%s').\n",
|
||||
Swig_name_decl(nodes[i].n), SwigType_str(Getattr(p1, "type"), 0));
|
||||
nodes[i].error = 1;
|
||||
} else if (!t2 && !nodes[j].error) {
|
||||
} else if ((!t2) && (!nodes[j].error)) {
|
||||
Swig_warning(WARN_TYPEMAP_TYPECHECK, Getfile(nodes[j].n), Getline(nodes[j].n),
|
||||
"Overloaded method %s not supported (incomplete type checking rule - no precedence level in typecheck typemap for '%s').\n",
|
||||
Swig_name_decl(nodes[j].n), SwigType_str(Getattr(p2, "type"), 0));
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ public:
|
|||
* Create a stub for this function, provided it's not a member function
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
if (blessed && !member_func) {
|
||||
if ((blessed) && (!member_func)) {
|
||||
Printv(func_stubs, "*", iname, " = *", cmodule, "::", iname, ";\n", NIL);
|
||||
}
|
||||
|
||||
|
|
@ -1257,7 +1257,7 @@ public:
|
|||
if (verbose > 0) {
|
||||
fprintf(stdout, "setclassname: Found actualpackage: %s\n", Char(actualpackage));
|
||||
}
|
||||
if (!compat && !Strchr(symname,':')) {
|
||||
if ((!compat) && (!Strchr(symname,':'))) {
|
||||
fullname = NewStringf("%s::%s",actualpackage,symname);
|
||||
} else {
|
||||
fullname = NewString(symname);
|
||||
|
|
@ -1896,7 +1896,7 @@ public:
|
|||
String *code = Getattr(n, "code");
|
||||
String *section = Getattr(n, "section");
|
||||
|
||||
if (!ImportMode && Cmp(section, "perl") == 0) {
|
||||
if ((!ImportMode) && (Cmp(section, "perl") == 0)) {
|
||||
Printv(additional_perl_code, code, NIL);
|
||||
} else {
|
||||
Language::insertDirective(n);
|
||||
|
|
|
|||
|
|
@ -3474,7 +3474,7 @@ public:
|
|||
if (builtin)
|
||||
Printf(f_init, "\t SwigPyBuiltin_AddPublicSymbol(public_interface, \"%s\");\n", global_name);
|
||||
have_globals = 1;
|
||||
if (!builtin && shadow && (!(shadow & PYSHADOW_MEMBER))) {
|
||||
if (!builtin && (shadow) && (!(shadow & PYSHADOW_MEMBER))) {
|
||||
Printf(f_shadow_stubs, "%s = %s.%s\n", global_name, module, global_name);
|
||||
}
|
||||
}
|
||||
|
|
@ -3632,7 +3632,7 @@ public:
|
|||
|
||||
if ((tm = Swig_typemap_lookup("constcode", n, name, 0))) {
|
||||
Replaceall(tm, "$value", value);
|
||||
if (needs_swigconstant(n) && !builtin && shadow && !(shadow & PYSHADOW_MEMBER) && (!in_class || !Getattr(n, "feature:python:callback"))) {
|
||||
if (needs_swigconstant(n) && !builtin && (shadow) && (!(shadow & PYSHADOW_MEMBER)) && (!in_class || !Getattr(n, "feature:python:callback"))) {
|
||||
// Generate `*_swigconstant()` method which registers the new constant.
|
||||
//
|
||||
// *_swigconstant methods are required for constants of class type.
|
||||
|
|
@ -3670,7 +3670,7 @@ public:
|
|||
return SWIG_NOWRAP;
|
||||
}
|
||||
|
||||
if (!builtin && shadow && !(shadow & PYSHADOW_MEMBER)) {
|
||||
if (!builtin && (shadow) && (!(shadow & PYSHADOW_MEMBER))) {
|
||||
String *f_s;
|
||||
if (!in_class) {
|
||||
f_s = f_shadow;
|
||||
|
|
|
|||
|
|
@ -1362,7 +1362,7 @@ List * R::Swig_overload_rank(Node *n,
|
|||
Parm *p2 = nodes[j].parms;
|
||||
int differ = 0;
|
||||
int num_checked = 0;
|
||||
while (p1 && p2 && num_checked < nodes[i].argc) {
|
||||
while (p1 && p2 && (num_checked < nodes[i].argc)) {
|
||||
if (debugMode) {
|
||||
Printf(stdout,"p1 = '%s', p2 = '%s'\n", Getattr(p1,"type"), Getattr(p2,"type"));
|
||||
}
|
||||
|
|
@ -1379,12 +1379,12 @@ List * R::Swig_overload_rank(Node *n,
|
|||
if (debugMode) {
|
||||
Printf(stdout,"t1 = '%s', t2 = '%s'\n", t1, t2);
|
||||
}
|
||||
if (!t1 && !nodes[i].error) {
|
||||
if ((!t1) && (!nodes[i].error)) {
|
||||
Swig_warning(WARN_TYPEMAP_TYPECHECK, Getfile(nodes[i].n), Getline(nodes[i].n),
|
||||
"Overloaded method %s not supported (incomplete type checking rule - no precedence level in typecheck typemap for '%s').\n",
|
||||
Swig_name_decl(nodes[i].n), SwigType_str(Getattr(p1, "type"), 0));
|
||||
nodes[i].error = 1;
|
||||
} else if (!t2 && !nodes[j].error) {
|
||||
} else if ((!t2) && (!nodes[j].error)) {
|
||||
Swig_warning(WARN_TYPEMAP_TYPECHECK, Getfile(nodes[j].n), Getline(nodes[j].n),
|
||||
"Overloaded method %s not supported (incomplete type checking rule - no precedence level in typecheck typemap for '%s').\n",
|
||||
Swig_name_decl(nodes[j].n), SwigType_str(Getattr(p2, "type"), 0));
|
||||
|
|
|
|||
|
|
@ -807,7 +807,7 @@ public:
|
|||
b = First(baselist);
|
||||
while (b.item) {
|
||||
String *bname = Getattr(b.item, "name");
|
||||
if (!bname || GetFlag(b.item, "feature:ignore") || !Getattr(b.item, "module")) {
|
||||
if ((!bname) || GetFlag(b.item, "feature:ignore") || (!Getattr(b.item, "module"))) {
|
||||
b = Next(b);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ class TypePass:private Dispatcher {
|
|||
virtual int classforwardDeclaration(Node *n) {
|
||||
|
||||
/* Can't do inside a C struct because it breaks C nested structure wrapping */
|
||||
if (!inclass || CPlusPlus) {
|
||||
if ((!inclass) || (CPlusPlus)) {
|
||||
String *name = Getattr(n, "name");
|
||||
SwigType_typedef_class(name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue