diff --git a/tools/amalgamate.py b/tools/amalgamate.py index 9ad028636d..9640201a16 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -16,11 +16,11 @@ class Amalgamator: self.output_h = open(output_path + "upb.h", "w") self.output_c = open(output_path + "upb.c", "w") - self.output_c.write("// Amalgamated source file\n") + self.output_c.write("/* Amalgamated source file */\n") self.output_c.write('#include "upb.h"\n') self.output_c.write(open("upb/port_def.inc").read()) - self.output_h.write("// Amalgamated source file\n") + self.output_h.write("/* Amalgamated source file */\n") self.output_h.write(open("upb/port_def.inc").read()) def finish(self): diff --git a/upb/handlers-inl.h b/upb/handlers-inl.h index 5677a4a004..40a0047c13 100644 --- a/upb/handlers-inl.h +++ b/upb/handlers-inl.h @@ -7,6 +7,8 @@ #define UPB_HANDLERS_INL_H_ #include +#include +#include "upb/handlers.h" #ifdef __cplusplus @@ -162,8 +164,8 @@ struct FuncInfo { * These functions are not bound to a handler data so have no data or cleanup * handler. */ struct UnboundFunc { - CleanupFunc *GetCleanup() { return NULL; } - void *GetData() { return NULL; } + CleanupFunc *GetCleanup() { return nullptr; } + void *GetData() { return nullptr; } }; template