Fix previous commit

Revert changes inadvertently included, and fix `=` to `==`.
This commit is contained in:
Olly Betts 2022-03-20 19:44:23 +13:00
commit b2c58115d7
20 changed files with 38 additions and 39 deletions

View file

@ -363,7 +363,7 @@ static DOH *name_object_get(Hash *namehash, String *tname, SwigType *decl, SwigT
Hash *n = Getattr(namehash, tname);
if (n) {
rn = get_object(n, decl);
if (!rn && ncdecl)
if ((!rn) && ncdecl)
rn = get_object(n, ncdecl);
if (!rn)
rn = get_object(n, 0);
@ -380,7 +380,7 @@ DOH *Swig_name_object_get(Hash *namehash, String *prefix, String *name, SwigType
return 0;
/* DB: This removed to more tightly control feature/name matching */
/* if (decl && SwigType_isqualifierdecl) {
/* if ((decl) && (SwigType_isqualifier(decl))) {
ncdecl = strchr(Char(decl),'.');
ncdecl++;
}

View file

@ -1207,7 +1207,7 @@ static void typemap_locals(String *s, ParmList *l, Wrapper *f, int argnum) {
/* If the user gave us $type as the name of the local variable, we'll use
the passed datatype instead */
if (argnum >= 0 && !isglobal) {
if ((argnum >= 0) && (!isglobal)) {
Printf(str, "%s%d", pn, argnum);
} else {
Append(str, pn);

View file

@ -1196,7 +1196,7 @@ String *SwigType_prefix(const SwigType *t) {
if (*d == '>') {
int nest = 1;
d--;
while ((d > c) && nest) {
while ((d > c) && (nest)) {
if (*d == '>')
nest++;
if (*d == '<')
@ -1208,7 +1208,7 @@ String *SwigType_prefix(const SwigType *t) {
/* Skip over params */
int nparen = 1;
d--;
while ((d > c) && nparen) {
while ((d > c) && (nparen)) {
if (*d == ')')
nparen++;
if (*d == '(')