Przeglądaj źródła

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.
rdb 7 lat temu
rodzic
commit
552a649ef3
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      dtool/src/parser-inc/stdtypedefs.h

+ 5 - 0
dtool/src/parser-inc/stdtypedefs.h

@@ -41,6 +41,11 @@ inline namespace std {
 
 
 struct timeval;
 struct timeval;
 
 
+#ifdef __cplusplus
+#define NULL 0L
+#else
+#define NULL ((void *)0)
+#endif
 typedef decltype(nullptr) nullptr_t;
 typedef decltype(nullptr) nullptr_t;
 
 
 // One day, we might extend interrogate to be able to parse this,
 // One day, we might extend interrogate to be able to parse this,