summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:02:51 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 18:02:51 +0000
commit1de74d0a96a2ffa6081c632ba7c51edf3992a899 (patch)
treef9de36ffab6a7b88f6ea119b38f75421f2aece4f /ppapi
parent9090ad70285be342c89e4099eedd899ae736d5d1 (diff)
downloadchromium_src-1de74d0a96a2ffa6081c632ba7c51edf3992a899.zip
chromium_src-1de74d0a96a2ffa6081c632ba7c51edf3992a899.tar.gz
chromium_src-1de74d0a96a2ffa6081c632ba7c51edf3992a899.tar.bz2
Trivial changes to IDL parser.
idl_option - fix incorrect 'if not X' to 'if X is None' to distinguish between no value (boolean) to empty ('') default value. idl_output - add function to retreive the filename TEST= python idl_c_header.py --wcomment --srcroot=../api --dstroot=hdir ../api/*.idl BUG= http://code.google.com/p/chromium/issues/detail?id=84272 Review URL: http://codereview.chromium.org/7200032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/generators/idl_option.py2
-rw-r--r--ppapi/generators/idl_outfile.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/generators/idl_option.py b/ppapi/generators/idl_option.py
index 0f7aa46..9b87d42 100644
--- a/ppapi/generators/idl_option.py
+++ b/ppapi/generators/idl_option.py
@@ -37,7 +37,7 @@ class Option(object):
if self.testfunc:
if not self.testfunc(self, value): return False
# If this is a boolean option, set it to true
- if not self.default:
+ if self.default is None:
self.value = True
else:
self.value = value
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index 76262d7..e25c3ca 100644
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -29,6 +29,10 @@ class IDLOutFile(object):
self.outlist = []
self.open = True
+ # Return the file name
+ def Filename(self):
+ return self.filename
+
# Append to the output if the file is still open
def Write(self, string):
if not self.open: