This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
C89 doesn't allow static dynamic initialization of complete structs
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 2 Aug 2010 15:17:24 +0000 (17:17 +0200)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Mon, 2 Aug 2010 15:17:24 +0000 (17:17 +0200)
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
op.c

diff --git a/op.c b/op.c
index 9539248..08b7954 100644 (file)
--- a/op.c
+++ b/op.c
@@ -105,10 +105,12 @@ recursive, but it's recursive on basic blocks, not on tree nodes.
 
 #define CALL_A_PEEP(peep, o) CALL_FPTR((peep)->fn)(aTHX_ o, peep)
 
-#define CALL_PEEP(o)                                                   \
-    STMT_START {                                                       \
-       peep_next_t _next_peep = { PL_peepp, NULL };                    \
-       CALL_A_PEEP(&_next_peep, o);                                    \
+#define CALL_PEEP(o)                           \
+    STMT_START {                               \
+       peep_next_t _next_peep;                 \
+       _next_peep.fn        = PL_peepp;        \
+       _next_peep.user_data = NULL;            \
+       CALL_A_PEEP(&_next_peep, o);            \
     } STMT_END
 
 #define CALL_OPFREEHOOK(o) if (PL_opfreehook) CALL_FPTR(PL_opfreehook)(aTHX_ o)