Another merge with master.
Updated Doxygen error numbers yet again, as Python errors got added in the meanwhile, pushing the Doxygen ones further off. And re-merged PEP8/whitespace-related conflicts in autodoc_runme.py once again (if anybody is looking for a motivating example about why significant whitespace is bad, here is a great use case).
This commit is contained in:
commit
302955a152
448 changed files with 8836 additions and 5079 deletions
|
|
@ -194,7 +194,7 @@ static FILE *Swig_open_file(const_String_or_char_ptr name, int sysfile, int use_
|
|||
lastpath = filename;
|
||||
|
||||
/* Skip the UTF-8 BOM if it's present */
|
||||
nbytes = fread(bom, 1, 3, f);
|
||||
nbytes = (int)fread(bom, 1, 3, f);
|
||||
if (nbytes == 3 && bom[0] == (char)0xEF && bom[1] == (char)0xBB && bom[2] == (char)0xBF) {
|
||||
/* skip */
|
||||
} else {
|
||||
|
|
@ -369,7 +369,7 @@ String *Swig_file_filename(const_String_or_char_ptr filename) {
|
|||
String *Swig_file_dirname(const_String_or_char_ptr filename) {
|
||||
const char *delim = SWIG_FILE_DELIMITER;
|
||||
const char *c = strrchr(Char(filename), *delim);
|
||||
return c ? NewStringWithSize(filename, c - Char(filename) + 1) : NewString("");
|
||||
return c ? NewStringWithSize(filename, (int)(c - Char(filename) + 1)) : NewString("");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ String *Swig_strip_c_comments(const String *s) {
|
|||
}
|
||||
|
||||
if (comment_begin && comment_end) {
|
||||
int size = comment_begin - Char(s);
|
||||
int size = (int)(comment_begin - Char(s));
|
||||
String *stripmore = 0;
|
||||
stripped = NewStringWithSize(s, size);
|
||||
Printv(stripped, comment_end + 1, NIL);
|
||||
|
|
@ -808,7 +808,7 @@ void Swig_scopename_split(const String *s, String **rprefix, String **rlast) {
|
|||
*rlast = Copy(s);
|
||||
return;
|
||||
} else {
|
||||
*rprefix = NewStringWithSize(cc, co - cc - 2);
|
||||
*rprefix = NewStringWithSize(cc, (int)(co - cc - 2));
|
||||
*rlast = NewString(co);
|
||||
return;
|
||||
}
|
||||
|
|
@ -835,7 +835,7 @@ void Swig_scopename_split(const String *s, String **rprefix, String **rlast) {
|
|||
}
|
||||
|
||||
if (cc != tmp) {
|
||||
*rprefix = NewStringWithSize(tmp, cc - tmp);
|
||||
*rprefix = NewStringWithSize(tmp, (int)(cc - tmp));
|
||||
*rlast = NewString(cc + 2);
|
||||
return;
|
||||
} else {
|
||||
|
|
@ -858,7 +858,7 @@ String *Swig_scopename_prefix(const String *s) {
|
|||
if (co == cc) {
|
||||
return 0;
|
||||
} else {
|
||||
String *prefix = NewStringWithSize(cc, co - cc - 2);
|
||||
String *prefix = NewStringWithSize(cc, (int)(co - cc - 2));
|
||||
return prefix;
|
||||
}
|
||||
}
|
||||
|
|
@ -884,7 +884,7 @@ String *Swig_scopename_prefix(const String *s) {
|
|||
}
|
||||
|
||||
if (cc != tmp) {
|
||||
return NewStringWithSize(tmp, cc - tmp);
|
||||
return NewStringWithSize(tmp, (int)(cc - tmp));
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -977,7 +977,7 @@ String *Swig_scopename_first(const String *s) {
|
|||
}
|
||||
}
|
||||
if (*c && (c != tmp)) {
|
||||
return NewStringWithSize(tmp, c - tmp);
|
||||
return NewStringWithSize(tmp, (int)(c - tmp));
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1219,8 +1219,8 @@ static int split_regex_pattern_subst(String *s, String **pattern, String **subst
|
|||
if (!p) goto err_out;
|
||||
sube = p;
|
||||
|
||||
*pattern = NewStringWithSize(pats, pate - pats);
|
||||
*subst = NewStringWithSize(subs, sube - subs);
|
||||
*pattern = NewStringWithSize(pats, (int)(pate - pats));
|
||||
*subst = NewStringWithSize(subs, (int)(sube - subs));
|
||||
*input = p + 1;
|
||||
return 1;
|
||||
|
||||
|
|
@ -1270,10 +1270,10 @@ String *replace_captures(int num_captures, const char *input, String *subst, int
|
|||
/* Copy part without substitutions */
|
||||
const char *q = strchr(p, '\\');
|
||||
if (!q) {
|
||||
copy_with_maybe_case_conversion(result, p, strlen(p), &convertCase, convertNextOnly);
|
||||
copy_with_maybe_case_conversion(result, p, (int)strlen(p), &convertCase, convertNextOnly);
|
||||
break;
|
||||
}
|
||||
copy_with_maybe_case_conversion(result, p, q - p, &convertCase, convertNextOnly);
|
||||
copy_with_maybe_case_conversion(result, p, (int)(q - p), &convertCase, convertNextOnly);
|
||||
p = q + 1;
|
||||
|
||||
/* Handle substitution */
|
||||
|
|
@ -1350,7 +1350,7 @@ String *Swig_string_regex(String *s) {
|
|||
pcre_error, Char(pattern), pcre_errorpos);
|
||||
exit(1);
|
||||
}
|
||||
rc = pcre_exec(compiled_pat, NULL, input, strlen(input), 0, 0, captures, 30);
|
||||
rc = pcre_exec(compiled_pat, NULL, input, (int)strlen(input), 0, 0, captures, 30);
|
||||
if (rc >= 0) {
|
||||
res = replace_captures(rc, input, subst, captures, pattern, s);
|
||||
} else if (rc != PCRE_ERROR_NOMATCH) {
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ void Swig_name_object_inherit(Hash *namehash, String *base, String *derived) {
|
|||
bprefix = NewStringf("%s::", base);
|
||||
dprefix = NewStringf("%s::", derived);
|
||||
cbprefix = Char(bprefix);
|
||||
plen = strlen(cbprefix);
|
||||
plen = (int)strlen(cbprefix);
|
||||
for (ki = First(namehash); ki.key; ki = Next(ki)) {
|
||||
char *k = Char(ki.key);
|
||||
if (strncmp(k, cbprefix, plen) == 0) {
|
||||
|
|
@ -1003,6 +1003,10 @@ static int nodes_are_equivalent(Node *a, Node *b, int a_inclass) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
if (Equal(ta, "template") && Equal(tb, "template")) {
|
||||
if (Cmp(a_storage, "friend") == 0 || Cmp(b_storage, "friend") == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1070,7 +1074,7 @@ static List *Swig_make_attrlist(const char *ckey) {
|
|||
String *nattr;
|
||||
const char *rattr = strchr(++cattr, '$');
|
||||
while (rattr) {
|
||||
nattr = NewStringWithSize(cattr, rattr - cattr);
|
||||
nattr = NewStringWithSize(cattr, (int)(rattr - cattr));
|
||||
Append(list, nattr);
|
||||
Delete(nattr);
|
||||
cattr = rattr + 1;
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ static void brackets_reset(Scanner *s) {
|
|||
* Usually called when '(' is found.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
static void brackets_push(Scanner *s) {
|
||||
int *newInt = malloc(sizeof(int));
|
||||
int *newInt = (int *)malloc(sizeof(int));
|
||||
*newInt = 0;
|
||||
Push(s->brackets, NewVoid(newInt, free));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ int SwigType_ispointer_return(const SwigType *t) {
|
|||
if (!t)
|
||||
return 0;
|
||||
c = Char(t);
|
||||
idx = strlen(c) - 4;
|
||||
idx = (int)strlen(c) - 4;
|
||||
if (idx >= 0) {
|
||||
return (strcmp(c + idx, ").p.") == 0);
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ int SwigType_isreference_return(const SwigType *t) {
|
|||
if (!t)
|
||||
return 0;
|
||||
c = Char(t);
|
||||
idx = strlen(c) - 4;
|
||||
idx = (int)strlen(c) - 4;
|
||||
if (idx >= 0) {
|
||||
return (strcmp(c + idx, ").r.") == 0);
|
||||
}
|
||||
|
|
@ -485,7 +485,7 @@ String *SwigType_namestr(const SwigType *t) {
|
|||
if (!c || !strstr(c + 2, ")>"))
|
||||
return NewString(t);
|
||||
|
||||
r = NewStringWithSize(d, c - d);
|
||||
r = NewStringWithSize(d, (int)(c - d));
|
||||
if (*(c - 1) == '<')
|
||||
Putc(' ', r);
|
||||
Putc('<', r);
|
||||
|
|
|
|||
|
|
@ -1149,7 +1149,7 @@ Node *Swig_symbol_clookup(const_String_or_char_ptr name, Symtab *n) {
|
|||
Symtab *un = Getattr(s, "sym:symtab");
|
||||
Node *ss = (!Equal(name, uname) || (un != n)) ? Swig_symbol_clookup(uname, un) : 0; /* avoid infinity loop */
|
||||
if (!ss) {
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
|
||||
}
|
||||
s = ss;
|
||||
}
|
||||
|
|
@ -1221,7 +1221,7 @@ Node *Swig_symbol_clookup_check(const_String_or_char_ptr name, Symtab *n, int (*
|
|||
Node *ss;
|
||||
ss = Swig_symbol_clookup(Getattr(s, "uname"), Getattr(s, "sym:symtab"));
|
||||
if (!ss && !checkfunc) {
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
|
||||
}
|
||||
s = ss;
|
||||
}
|
||||
|
|
@ -1272,7 +1272,7 @@ Node *Swig_symbol_clookup_local(const_String_or_char_ptr name, Symtab *n) {
|
|||
while (s && Checkattr(s, "nodeType", "using")) {
|
||||
Node *ss = Swig_symbol_clookup_local(Getattr(s, "uname"), Getattr(s, "sym:symtab"));
|
||||
if (!ss) {
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
|
||||
}
|
||||
s = ss;
|
||||
}
|
||||
|
|
@ -1320,7 +1320,7 @@ Node *Swig_symbol_clookup_local_check(const_String_or_char_ptr name, Symtab *n,
|
|||
while (s && Checkattr(s, "nodeType", "using")) {
|
||||
Node *ss = Swig_symbol_clookup_local_check(Getattr(s, "uname"), Getattr(s, "sym:symtab"), checkfunc);
|
||||
if (!ss && !checkfunc) {
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s, "uname"));
|
||||
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", SwigType_namestr(Getattr(s, "uname")));
|
||||
}
|
||||
s = ss;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1844,7 +1844,7 @@ static List *split_embedded_typemap(String *s) {
|
|||
}
|
||||
}
|
||||
if ((level == 0) && angle_level == 0 && ((*c == ',') || (*c == ')'))) {
|
||||
String *tmp = NewStringWithSize(start, c - start);
|
||||
String *tmp = NewStringWithSize(start, (int)(c - start));
|
||||
Append(args, tmp);
|
||||
Delete(tmp);
|
||||
start = c + 1;
|
||||
|
|
@ -1915,10 +1915,10 @@ static void replace_embedded_typemap(String *s, ParmList *parm_sublist, Wrapper
|
|||
c++;
|
||||
}
|
||||
if (end) {
|
||||
dollar_typemap = NewStringWithSize(start, (end - start));
|
||||
dollar_typemap = NewStringWithSize(start, (int)((end - start)));
|
||||
syntax_error = 0;
|
||||
} else {
|
||||
dollar_typemap = NewStringWithSize(start, (c - start));
|
||||
dollar_typemap = NewStringWithSize(start, (int)((c - start)));
|
||||
}
|
||||
|
||||
if (!syntax_error) {
|
||||
|
|
@ -1963,7 +1963,7 @@ static void replace_embedded_typemap(String *s, ParmList *parm_sublist, Wrapper
|
|||
char *eq = strchr(Char(parm), '=');
|
||||
char *c = Char(parm);
|
||||
if (eq && (eq - c > 0)) {
|
||||
String *name = NewStringWithSize(c, eq - c);
|
||||
String *name = NewStringWithSize(c, (int)(eq - c));
|
||||
String *value = NewString(eq + 1);
|
||||
Insert(name, 0, "$");
|
||||
Setattr(vars, name, value);
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ SwigType *SwigType_del_pointer(SwigType *t) {
|
|||
printf("Fatal error. SwigType_del_pointer applied to non-pointer.\n");
|
||||
abort();
|
||||
}
|
||||
Delslice(t, 0, (c - s) + 2);
|
||||
Delslice(t, 0, (int)((c - s) + 2));
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
@ -915,7 +915,7 @@ SwigType *SwigType_add_template(SwigType *t, ParmList *parms) {
|
|||
String *SwigType_templateprefix(const SwigType *t) {
|
||||
const char *s = Char(t);
|
||||
const char *c = strstr(s, "<(");
|
||||
return c ? NewStringWithSize(s, c - s) : NewString(s);
|
||||
return c ? NewStringWithSize(s, (int)(c - s)) : NewString(s);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
@ -966,7 +966,7 @@ String *SwigType_templatesuffix(const SwigType *t) {
|
|||
String *SwigType_istemplate_templateprefix(const SwigType *t) {
|
||||
const char *s = Char(t);
|
||||
const char *c = strstr(s, "<(");
|
||||
return c ? NewStringWithSize(s, c - s) : 0;
|
||||
return c ? NewStringWithSize(s, (int)(c - s)) : 0;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
@ -989,7 +989,7 @@ String *SwigType_istemplate_only_templateprefix(const SwigType *t) {
|
|||
const char *s = Char(t);
|
||||
if (len >= 4 && strcmp(s + len - 2, ")>") == 0) {
|
||||
const char *c = strstr(s, "<(");
|
||||
return c ? NewStringWithSize(s, c - s) : 0;
|
||||
return c ? NewStringWithSize(s, (int)(c - s)) : 0;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1022,7 +1022,7 @@ String *SwigType_templateargs(const SwigType *t) {
|
|||
nest--;
|
||||
c++;
|
||||
}
|
||||
return NewStringWithSize(start, c - start);
|
||||
return NewStringWithSize(start, (int)(c - start));
|
||||
}
|
||||
c++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue