Move rename/namewarn engine from parser.y to naming.c. The code was getting

too large to be in the parser.

Centralize the swig keys to avoid replication and wrong spellings.

Use more HashGetAttr where possible and other speed improvements
to compensate for the extra work introduced by the new rename/namewarn
mechanism.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-02 04:33:19 +00:00
commit a9ab040ef5
18 changed files with 938 additions and 823 deletions

View file

@ -1575,7 +1575,7 @@ public:
if (i == num_required) Putc('|', parse_args); /* Optional argument separator */
/* Keyword argument handling */
String *wrn = (allow_kwargs && pn) ? Swig_cparse_name_warning(0,0,pn,0) : 0;
String *wrn = (allow_kwargs && pn) ? Swig_name_warning(p,0,pn,0) : 0;
if (!wrn && Len(pn)) {
Printf(kwargs,"(char *) \"%s\",", pn);
} else {
@ -1585,7 +1585,7 @@ public:
do we need to emit a warning?
*/
Printf(kwargs,"(char *) \"_%s\",", pn);
Swig_warning(0,Getfile(n),Getline(n), "%s, renaming parameter to _%s\n", wrn, pn);
Swig_warning(0,Getfile(n),Getline(n), "314:, '%s' is a renaming parameter to _%s\n", wrn, pn);
} else {
Printf(kwargs,"(char *)\"arg%d\",", i+1);
}