add simple warning to deprecated %name directive

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6749 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-16 06:04:27 +00:00
commit 831b585d55

View file

@ -1849,12 +1849,16 @@ 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");
yyrename = NewString($3);
$$ = 0;
}
| NAME LPAREN RPAREN {
$$ = 0;
Swig_error(cparse_file,cparse_line,"Missing argument to %%name directive.\n");
Swig_warning(WARN_DEPRECATED_EXCEPT,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");
}
;