[beast] SFI: make peek_or_return macro work in C++ sources



commit b3888eb031b701ee083d96112d75f6486b21923d
Author: Stefan Westerfeld <stefan space twc de>
Date:   Mon Jul 11 14:21:59 2011 +0200

    SFI: make peek_or_return macro work in C++ sources

 sfi/sfistore.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sfi/sfistore.h b/sfi/sfistore.h
index 98cb8b0..3905e57 100644
--- a/sfi/sfistore.h
+++ b/sfi/sfistore.h
@@ -145,8 +145,8 @@ void            sfi_rstore_quick_scan         (SfiRStore      *rstore,
     return _t; \
 }G_STMT_END
 #define sfi_scanner_peek_or_return(scanner, token)   G_STMT_START{ \
-  GScanner *__s = (scanner); guint _t = (token); \
-  if (g_scanner_peek_next_token (__s) != _t) { \
+  GScanner *__s = (scanner); SfiTokenType _t = (SfiTokenType) (token); \
+  if ((SfiTokenType) g_scanner_peek_next_token (__s) != _t) { \
     g_scanner_get_next_token (__s); /* advance position for error-handler */ \
     return _t; \
   } \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]