From 552a649ef3fcad1690f99e53b1d50e7494bce21c Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 4 Apr 2018 21:48:02 +0200 Subject: [PATCH] interrogate: add back NULL definition, fixes some keyword arguments I am not sure why the definition of NULL was removed; it might have been by mistake, but in any case it broke code like this: img = PNMImage(w, h, color_space=CS_srgb) since it would not understand the default value (NULL) for the argument preceding color_space. --- dtool/src/parser-inc/stdtypedefs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index c1febd3955..f971d7e1f2 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -41,6 +41,11 @@ inline namespace std { struct timeval; +#ifdef __cplusplus +#define NULL 0L +#else +#define NULL ((void *)0) +#endif typedef decltype(nullptr) nullptr_t; // One day, we might extend interrogate to be able to parse this,