From 61b137299670fe89e89ecddce924b119839946ec Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 6 Oct 2006 11:08:28 +0000 Subject: [PATCH] Covert a stderr message to a proper SWIG warning. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9418 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Warnings.html | 3 ++- Source/Modules/php4.cxx | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/Manual/Warnings.html b/Doc/Manual/Warnings.html index 26515bedf..f6f1a9d28 100644 --- a/Doc/Manual/Warnings.html +++ b/Doc/Manual/Warnings.html @@ -498,7 +498,8 @@ example.i(4): Syntax error in input.

14.8.7 User defined (900-999)

diff --git a/Source/Modules/php4.cxx b/Source/Modules/php4.cxx index 02532d035..e98d74f43 100644 --- a/Source/Modules/php4.cxx +++ b/Source/Modules/php4.cxx @@ -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); } } }