Commit 6a3acf1e authored by dmichael@chromium.org's avatar dmichael@chromium.org

PPAPI: Make generator support "no_interface_string"

This is so I can introduce a new way to do PPP interfaces that are
passed to a related PPB interface, instead of using PPP_GetInterface.

Note this doesn't add support for the PNaCl shim yet, although it should
at least make it compile.

BUG=367896

Review URL: https://codereview.chromium.org/281203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271425 0039d316-1c4b-4281-b951-d872f2087c98
parent 46e18dab
...@@ -288,6 +288,9 @@ class HGen(GeneratorByFile): ...@@ -288,6 +288,9 @@ class HGen(GeneratorByFile):
# Skip this interface if there are no matching versions # Skip this interface if there are no matching versions
if not unique: continue if not unique: continue
# Skip this interface if it should have no interface string.
if node.GetProperty('no_interface_string'): continue
last_stable_ver = None last_stable_ver = None
last_dev_rel = None last_dev_rel = None
for rel in unique: for rel in unique:
......
...@@ -349,7 +349,9 @@ const void *__%(wrapper_prefix)s_PPPGetInterface(const char *name) { ...@@ -349,7 +349,9 @@ const void *__%(wrapper_prefix)s_PPPGetInterface(const char *name) {
def GenerateWrapperInfoAndCollection(self, iface_releases, out): def GenerateWrapperInfoAndCollection(self, iface_releases, out):
for iface in iface_releases: for iface in iface_releases:
iface_macro = self.cgen.GetInterfaceMacro(iface.node, iface.version) iface_macro = "NULL"
if not iface.node.GetProperty("no_interface_string"):
iface_macro = self.cgen.GetInterfaceMacro(iface.node, iface.version)
if iface.needs_wrapping: if iface.needs_wrapping:
wrap_iface = '(const void *) &%s_Wrappers_%s' % (self.wrapper_prefix, wrap_iface = '(const void *) &%s_Wrappers_%s' % (self.wrapper_prefix,
iface.struct_name) iface.struct_name)
......
...@@ -66,6 +66,12 @@ struct ifaceBar_1_0 { ...@@ -66,6 +66,12 @@ struct ifaceBar_1_0 {
}; };
typedef struct ifaceBar_1_0 ifaceBar; typedef struct ifaceBar_1_0 ifaceBar;
struct ifaceNoString_1_0 {
void (*mem)(void);
};
typedef struct ifaceNoString_1_0 ifaceNoString;
/** /**
* @} * @}
*/ */
......
...@@ -41,6 +41,11 @@ interface ifaceBar { ...@@ -41,6 +41,11 @@ interface ifaceBar {
ifaceFoo createIface([in] str_t name); ifaceFoo createIface([in] str_t name);
}; };
[no_interface_string]
interface ifaceNoString {
void mem();
};
struct struct2 { struct struct2 {
ifaceBar bar; ifaceBar bar;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment