瀏覽代碼

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 年之前
父節點
當前提交
552a649ef3
共有 1 個文件被更改,包括 5 次插入0 次删除
  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;
 
+#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,