Skip to content

Commit 5e1ee56

Browse files
committed
Update for dropped param to pretty_printer ctor
GCC 9's r263275 dropped the "prefix" param to pretty_printer's ctor.
1 parent 170ecd9 commit 5e1ee56

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gcc-python-pretty-printer.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ PyGccPrettyPrinter_New(void)
4444
#if (GCC_VERSION >= 4009)
4545
/* GCC 4.9 eliminated pp_construct in favor of a C++ ctor.
4646
Use placement new to run it on obj->pp. */
47-
new ((void*)&obj->pp) pretty_printer(NULL, 0);
47+
new ((void*)&obj->pp)
48+
pretty_printer(
49+
# if (GCC_VERSION < 9000)
50+
/* GCC 9 eliminated the "prefix" param. */
51+
NULL,
52+
# endif
53+
0);
4854
#else
4955
pp_construct(&obj->pp, /* prefix */NULL, /* line-width */0);
5056
#endif

0 commit comments

Comments
 (0)