[phc-internals] [phc commit] r1180 - trunk/src/lib
codesite-noreply at google.com
codesite-noreply at google.com
Wed Apr 16 12:53:48 IST 2008
Author: paul.biggar
Date: Wed Apr 16 04:47:29 2008
New Revision: 1180
Modified:
trunk/src/lib/error.cpp
trunk/src/lib/error.h
Log:
Add an extra error/warning signature, for when a va_list structure is
provided. This is for interfacing with the PHP run-time, which comes in
a later patch.
Modified: trunk/src/lib/error.cpp
==============================================================================
--- trunk/src/lib/error.cpp (original)
+++ trunk/src/lib/error.cpp Wed Apr 16 04:47:29 2008
@@ -65,6 +65,19 @@
define_explicit_message_func (error, ERROR);
define_explicit_message_func (warning, WARNING);
+#define define_va_list_message_func(NAME, TYPE) \
+void phc_##NAME (const char* message, va_list argp, \
+ String* filename, int line) \
+{ \
+ phc_message(TYPE, message, filename, line, argp); \
+ va_end(argp); \
+}
+
+define_va_list_message_func (internal_error, INTERNAL_ERROR);
+define_va_list_message_func (error, ERROR);
+define_va_list_message_func (warning, WARNING);
+
+
// No filename or line number
#define define_null_message_func(NAME, TYPE) \
void phc_##NAME (const char* message, ... ) \
Modified: trunk/src/lib/error.h
==============================================================================
--- trunk/src/lib/error.h (original)
+++ trunk/src/lib/error.h Wed Apr 16 04:47:29 2008
@@ -15,6 +15,7 @@
namespace MIR { class Node; }
void phc_internal_error (const char* message, ...);
+void phc_internal_error (const char* message, va_list args, String*
filename, int line);
void phc_internal_error (const char* message, String* filename, int line, ...);
void phc_internal_error (const char* message, AST::Node*, ...);
void phc_internal_error (const char* message, HIR::Node*, ...);
@@ -23,6 +24,7 @@
void phc_error (const char* message, ...);
+void phc_error (const char* message, va_list args, String* filename,
int line);
void phc_error (const char* message, String* filename, int line, ...);
void phc_error (const char* message, AST::Node*, ...);
void phc_error (const char* message, HIR::Node*, ...);
@@ -31,6 +33,7 @@
void phc_warning (const char* message, ...);
+void phc_warning (const char* message, va_list args, String* filename,
int line);
void phc_warning (const char* message, String* filename, int line, ...);
void phc_warning (const char* message, AST::Node*, ...);
void phc_warning (const char* message, HIR::Node*, ...);
More information about the phc-internals
mailing list