Commit 2941cb4c authored by David Gobbi's avatar David Gobbi
Browse files

Make wrappers guess type of NULL as nullptr_t.

When the wrappers encounter NULL in a header file, specifically in the case
of "#define something NULL", it now treated as a value of type nullptr_t,
similar to nullptr itself.  This ensures that NULL will not be wrapped as
int, even if it is defined to be 0.
parent 4d6be94b
Pipeline #4244 passed with stage
......@@ -11084,7 +11084,7 @@ unsigned int guess_constant_type(const char *valstring)
return VTK_PARSE_BOOL;
}
if (strcmp(valstring, "nullptr") == 0)
if (strcmp(valstring, "nullptr") == 0 || strcmp(valstring, "NULL") == 0)
{
return VTK_PARSE_NULLPTR_T;
}
......
......@@ -3686,7 +3686,7 @@ unsigned int guess_constant_type(const char *valstring)
return VTK_PARSE_BOOL;
}
if (strcmp(valstring, "nullptr") == 0)
if (strcmp(valstring, "nullptr") == 0 || strcmp(valstring, "NULL") == 0)
{
return VTK_PARSE_NULLPTR_T;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment