add proper deprecated code for %name

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-16 06:32:26 +00:00
commit df8c99079b
2 changed files with 5 additions and 4 deletions

View file

@ -1849,14 +1849,14 @@ module_directive: MODULE options idstring {
------------------------------------------------------------ */
name_directive : NAME LPAREN idstring RPAREN {
Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file,cparse_line,
"%%name is deprecated. Use %%rename instead (see docs).\n");
Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line,
"%%name is deprecated. Use %%rename instead (see docs).\n");
yyrename = NewString($3);
$$ = 0;
}
| NAME LPAREN RPAREN {
Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file,cparse_line,
"%%name is deprecated. Use %%rename instead (see docs).\n");
Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line,
"%%name is deprecated. Use %%rename instead (see docs).\n");
$$ = 0;
Swig_error(cparse_file,cparse_line,"Missing argument to %%name directive.\n");
}

View file

@ -42,6 +42,7 @@
#define WARN_DEPRECATED_EXCEPT_TM 118
#define WARN_DEPRECATED_IGNORE_TM 119
#define WARN_DEPRECATED_OPTC 120
#define WARN_DEPRECATED_NAME 121
/* -- Preprocessor -- */