Fix Incorrect Handling of Macros in WPP

Dan Hipschman dsh at linux.ucla.edu
Mon Jul 17 17:26:41 CDT 2006


Hi,

The correct behavior if the name of the macro appears in its definition is
to leave the name as is.  The current implementation deletes it.  I noticed
this when I was trying to workaround the MIDL "SAFEARRAY(type)" syntax
(which WIDL doesn't yet support), with a macro like

#define SAFEARRAY(T)	SAFEARRAY *

near the top of the IDL file.  Instead of "SAFEARRAY(BSTR)" being replaced
with "SAFEARRAY *", it's only replaced with "*".  This patch fixes that.

ChangeLog:
* In recurisive macro definitions, print the macro name instead of nothing
---
 libs/wpp/ppl.l |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index 317c38e..d62cf1d 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -661,6 +661,7 @@ includelogicentry_t *pp_includelogiclist
 				pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type);
 			}
 		}
+		else put_buffer(pptext, ppleng);
 	}
 
 	/*



More information about the wine-patches mailing list