Fixes for Google import.

pull/13171/head
Joshua Haberman 6 years ago
parent 7f9f7222bf
commit 9bc7973e38
  1. 4
      tools/amalgamate.py
  2. 6
      upb/handlers-inl.h

@ -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):

@ -7,6 +7,8 @@
#define UPB_HANDLERS_INL_H_
#include <limits.h>
#include <stddef.h>
#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 <class R, class P1, R F(P1), class I>

Loading…
Cancel
Save