cosmetic code formatting changes
This commit is contained in:
parent
dd6af222f4
commit
993214872f
3 changed files with 47 additions and 46 deletions
|
|
@ -1704,8 +1704,8 @@ public:
|
|||
return Language::pragmaDirective(n);
|
||||
}
|
||||
|
||||
String* getQualifiedInterfaceName(Node* n) {
|
||||
String* ret = Getattr(n, "interface:qname");
|
||||
String *getQualifiedInterfaceName(Node *n) {
|
||||
String *ret = Getattr(n, "interface:qname");
|
||||
if (!ret) {
|
||||
String *nspace = Getattr(n, "sym:nspace");
|
||||
String *symname = Getattr(n, "feature:interface:name");
|
||||
|
|
@ -1724,18 +1724,19 @@ public:
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
void addInterfaceNameAndUpcasts(String* interface_list, String* interface_upcasts, Hash* base_list, String* c_classname) {
|
||||
List* keys = Keys(base_list);
|
||||
|
||||
void addInterfaceNameAndUpcasts(String *interface_list, String *interface_upcasts, Hash *base_list, String *c_classname) {
|
||||
List *keys = Keys(base_list);
|
||||
for (Iterator it = First(keys); it.item; it = Next(it)) {
|
||||
Node* base = Getattr(base_list, it.item);
|
||||
String* c_baseclass = SwigType_namestr(Getattr(base, "name"));
|
||||
String* iname = Getattr(base, "feature:interface:name");
|
||||
Node *base = Getattr(base_list, it.item);
|
||||
String *c_baseclass = SwigType_namestr(Getattr(base, "name"));
|
||||
String *iname = Getattr(base, "feature:interface:name");
|
||||
if (Len(interface_list))
|
||||
Append(interface_list, ", ");
|
||||
Append(interface_list, iname);
|
||||
|
||||
String* upcast_name = 0;
|
||||
if (String* cptr_func = Getattr(base, "feature:interface:cptr"))
|
||||
String *upcast_name = 0;
|
||||
if (String *cptr_func = Getattr(base, "feature:interface:cptr"))
|
||||
upcast_name = NewStringf("%s", cptr_func);
|
||||
else
|
||||
upcast_name = NewStringf("%s_SWIGInterfaceUpcast", iname);
|
||||
|
|
@ -1814,7 +1815,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Hash* interface_bases = Getattr(n, "interface:bases");
|
||||
Hash *interface_bases = Getattr(n, "interface:bases");
|
||||
if (interface_bases)
|
||||
addInterfaceNameAndUpcasts(interface_list, interface_upcasts, interface_bases, c_classname);
|
||||
|
||||
|
|
@ -1974,8 +1975,7 @@ public:
|
|||
Delete(baseclass);
|
||||
}
|
||||
|
||||
void emitInterfaceDeclaration(Node* n, String* iname, File* f_interface, String *nspace)
|
||||
{
|
||||
void emitInterfaceDeclaration(Node *n, String *iname, File *f_interface, String *nspace) {
|
||||
if (package || nspace) {
|
||||
Printf(f_interface, "package ");
|
||||
if (package)
|
||||
|
|
@ -1988,11 +1988,11 @@ public:
|
|||
Printv(f_interface, typemapLookup(n, "javaimports", Getattr(n, "classtypeobj"), WARN_NONE), "\n", NIL);
|
||||
Printf(f_interface, "public interface %s", iname);
|
||||
if (List *baselist = Getattr(n, "bases")) {
|
||||
String* bases = 0;
|
||||
String *bases = 0;
|
||||
for (Iterator base = First(baselist); base.item; base = Next(base)) {
|
||||
if (GetFlag(base.item, "feature:ignore") || !Getattr(base.item, "feature:interface"))
|
||||
continue; // TODO: warn about skipped non-interface bases
|
||||
String* base_iname = Getattr(base.item, "feature:interface:name");
|
||||
String *base_iname = Getattr(base.item, "feature:interface:name");
|
||||
if (!bases)
|
||||
bases = Copy(base_iname);
|
||||
else {
|
||||
|
|
@ -2006,7 +2006,7 @@ public:
|
|||
}
|
||||
}
|
||||
Printf(f_interface, " {\n");
|
||||
if (String* cptr_func = Getattr(n, "feature:interface:cptr"))
|
||||
if (String *cptr_func = Getattr(n, "feature:interface:cptr"))
|
||||
Printf(f_interface, " long %s();\n", cptr_func);
|
||||
else
|
||||
Printf(f_interface, " long %s_SWIGInterfaceUpcast();\n", iname);
|
||||
|
|
@ -2078,7 +2078,7 @@ public:
|
|||
Swig_propagate_interface_methods(n);
|
||||
if (Getattr(n, "feature:interface")) {
|
||||
interface_class_code = NewStringEmpty();
|
||||
String* iname = Getattr(n, "feature:interface:name");
|
||||
String *iname = Getattr(n, "feature:interface:name");
|
||||
if (!iname) {
|
||||
Swig_error(Getfile(n), Getline(n), "Interface %s has no name attribute", proxy_class_name);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue