summaryrefslogtreecommitdiffstats
path: root/ppapi/generators
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 21:09:52 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 21:09:52 +0000
commita5b6ace771cbeec15ebdd94156d91f84e43ef617 (patch)
tree71fa664e1bba75f08c33a9afbc0ea14696bf5e5d /ppapi/generators
parent01fbe9606a7672d5f3161535bdde59858e5c0faa (diff)
downloadchromium_src-a5b6ace771cbeec15ebdd94156d91f84e43ef617.zip
chromium_src-a5b6ace771cbeec15ebdd94156d91f84e43ef617.tar.gz
chromium_src-a5b6ace771cbeec15ebdd94156d91f84e43ef617.tar.bz2
Pepper IDL: Keep "_dev" in thunk filenames.
Currently we can't autogenerate thunk files for interfaces that have a "normal" and a "dev" interface. This is because the outputted filenames will collide. This change will allow us to autogenerate thunk files for more interfaces. BUG= Review URL: https://chromiumcodereview.appspot.com/12221021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181549 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators')
-rwxr-xr-xppapi/generators/idl_thunk.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ppapi/generators/idl_thunk.py b/ppapi/generators/idl_thunk.py
index 71b8624..b3f59d1 100755
--- a/ppapi/generators/idl_thunk.py
+++ b/ppapi/generators/idl_thunk.py
@@ -54,14 +54,11 @@ def _GetBaseFileName(filenode):
"""Returns the base name for output files, given the filenode.
Examples:
- 'dev/ppb_find_dev.h' -> 'ppb_find'
+ 'dev/ppb_find_dev.h' -> 'ppb_find_dev'
'trusted/ppb_buffer_trusted.h' -> 'ppb_buffer_trusted'
"""
path, name = os.path.split(filenode.GetProperty('NAME'))
name = os.path.splitext(name)[0]
- if name.endswith('_dev'):
- # Clip off _dev suffix.
- name = name[:-len('_dev')]
return name
@@ -101,7 +98,11 @@ def _MakeEnterLine(filenode, interface, arg, handle_errors, callback, meta):
enter_type = 'EnterResource<%s>' % api_name
# The API header matches the file name, not the interface name.
- meta.AddApi(_GetBaseFileName(filenode) + '_api')
+ api_basename = _GetBaseFileName(filenode)
+ if api_basename.endswith('_dev'):
+ # Clip off _dev suffix.
+ api_basename = api_basename[:-len('_dev')]
+ meta.AddApi(api_basename + '_api')
if callback is None:
return '%s enter(%s, %s);' % (enter_type, arg[1],