Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: src/trusted/validator_x86/enum_gen.py

Issue 6883091: Start unit testing for functions in nc_inst_state.c (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_x86/enum_gen.py
===================================================================
--- src/trusted/validator_x86/enum_gen.py (revision 4944)
+++ src/trusted/validator_x86/enum_gen.py (working copy)
@@ -1,6 +1,7 @@
#!/usr/bin/python2.4
-# Copyright 2009, Google Inc.
-# All rights reserved.
+# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -194,6 +195,10 @@
enumname = _GetEnumName(enumfile)
print >>outfile, "#ifndef %s__" % _GetDefineName(simplified_filename)
print >>outfile, "#define %s__" % _GetDefineName(simplified_filename)
+ print >>outfile, ""
+ print >>outfile, '#include "native_client/src/include/portability.h"'
+ print >>outfile, ""
+ print >>outfile, "EXTERN_C_BEGIN"
print >>outfile, "typedef enum %s {" % enumname
enum_value = 0
for constant in constants:
@@ -207,6 +212,8 @@
print >>outfile, "/* Returns the name of an %s constant. */" % enumname
print >>outfile, "extern const char* %sName(%s name);" % (enumname, enumname)
print >>outfile, ""
+ print >>outfile, "EXTERN_C_END"
+ print >>outfile, ""
print >>outfile, "#endif /* %s__ */" % _GetDefineName(simplified_filename)
# Given the enumeration file name, and the constants defined within that file,

Powered by Google App Engine
This is Rietveld 408576698