diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-07-31 22:32:12 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-07-31 22:32:12 +0100 |
commit | cb2089531d4165786772c5cef17d28dc1a8e28d6 (patch) | |
tree | 8ba52f1dc3751719013938c78bd03055393d0e08 /src/duk-libdom.c | |
parent | 02ebfefd0fc3d81b59cc15f34033210a6344f430 (diff) | |
download | nsgenbind-cb2089531d4165786772c5cef17d28dc1a8e28d6.tar.gz nsgenbind-cb2089531d4165786772c5cef17d28dc1a8e28d6.tar.bz2 |
ensure nothing is generated for interfaces marked with NoInterfaceObject
Diffstat (limited to 'src/duk-libdom.c')
-rw-r--r-- | src/duk-libdom.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/duk-libdom.c b/src/duk-libdom.c index 49f100a..590afa2 100644 --- a/src/duk-libdom.c +++ b/src/duk-libdom.c @@ -1002,7 +1002,12 @@ static int output_interface(struct interface_map *interface_map, struct interface_map_entry *inherite; int res = 0; - /* compute clas name */ + /* do not generate class for interfaces marked no output */ + if (interfacee->noobject) { + return 0; + } + + /* compute class name */ interfacee->class_name = gen_class_name(interfacee); /* generate source filename */ @@ -1125,6 +1130,13 @@ output_private_header(struct interface_map *interface_map) interfacee = interface_map->entries + idx; + /* do not generate private structs for interfaces marked no + * output + */ + if (interfacee->noobject) { + continue; + } + /* find parent interface entry */ inherite = interface_map_inherit_entry(interface_map, interfacee); @@ -1201,6 +1213,13 @@ output_prototype_header(struct interface_map *interface_map) interfacee = interface_map->entries + idx; + /* do not generate prototype declarations for interfaces marked + * no output + */ + if (interfacee->noobject) { + continue; + } + /* prototype declaration */ fprintf(protof, "duk_ret_t %s_%s___proto(duk_context *ctx);\n", DLPFX, interfacee->class_name); @@ -1255,6 +1274,11 @@ output_makefile(struct interface_map *interface_map) interfacee = interface_map->entries + idx; + /* no source for interfaces marked no output */ + if (interfacee->noobject) { + continue; + } + fprintf(makef, "%s ", interfacee->filename); } fprintf(makef, "\nNSGENBIND_PREFIX:=%s\n", options->outdirname); |