Covert a stderr message to a proper SWIG warning.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2006-10-06 11:08:28 +00:00
commit f42f9ce303
2 changed files with 6 additions and 6 deletions

View file

@ -44,8 +44,8 @@
*/
/*
* TODO: Replace remaining stderr messages with Swig_warning (need to add more
* WARN_XXX codes to be able to...)
* TODO: Replace remaining stderr messages with Swig_error or Swig_warning
* (may need to add more WARN_PHP4_xxx codes...)
*/
char cvsroot_php4_cxx[] = "$Header$";
@ -1928,7 +1928,6 @@ public:
String *value = Getattr(n,"value");
if (Strcmp(lang,"php4") == 0) {
if (Strcmp(type, "code") == 0) {
if (value) {
Printf(pragma_code, "%s\n", value);
@ -1942,8 +1941,8 @@ public:
Printf(pragma_phpinfo, "%s\n", value);
}
} else {
Printf(stderr, "%s : Line %d. Unrecognized pragma.\n",
input_file, line_number);
Swig_warning(WARN_PHP4_UNKNOWN_PRAGMA, input_file, line_number,
"Unrecognized pragma <%s>.\n", type);
}
}
}