*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@910 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8dd7cb2b19
commit
2f0b0af50b
1 changed files with 20 additions and 12 deletions
|
|
@ -133,6 +133,15 @@ static void my_cplus_declare_const(char *name, char *iname, SwigType *type, char
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DOHList *typelist(Parm *p) {
|
||||||
|
DOHList *l = NewList();
|
||||||
|
while (p) {
|
||||||
|
Append(l,Gettype(p));
|
||||||
|
p = Getnext(p);
|
||||||
|
}
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
static TMParm *NewTMParm() {
|
static TMParm *NewTMParm() {
|
||||||
TMParm *tmp = (TMParm *) malloc(sizeof(TMParm));
|
TMParm *tmp = (TMParm *) malloc(sizeof(TMParm));
|
||||||
tmp->next = 0;
|
tmp->next = 0;
|
||||||
|
|
@ -149,15 +158,23 @@ static void add_pointers(SwigType *t, int npointer) {
|
||||||
// Emit an external function declaration
|
// Emit an external function declaration
|
||||||
|
|
||||||
static void emit_extern_func(char *decl, SwigType *t, ParmList *L, int extern_type, DOHFile *f) {
|
static void emit_extern_func(char *decl, SwigType *t, ParmList *L, int extern_type, DOHFile *f) {
|
||||||
|
|
||||||
|
List *tl;
|
||||||
|
SwigType *tc;
|
||||||
|
|
||||||
switch(extern_type) {
|
switch(extern_type) {
|
||||||
case 0:
|
case 0:
|
||||||
Printf(f,"%s", SwigType_str(t,0));
|
Printf(f,"%s", SwigType_str(t,0));
|
||||||
Printf(f,"%s(%s);\n", decl, ParmList_protostr(L));
|
Printf(f,"%s(%s);\n", decl, ParmList_protostr(L));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Printf(f,"extern %s", SwigType_str(t,0));
|
tl = typelist(L);
|
||||||
Printf(f,"%s(%s);\n", decl, ParmList_protostr(L));
|
tc = Copy(t);
|
||||||
|
SwigType_add_function(tc,tl);
|
||||||
|
Printf(f,"extern %s;\n", SwigType_str(tc,decl));
|
||||||
|
/* Printf(f,"%s(%s);\n", decl, ParmList_protostr(L)); */
|
||||||
|
Delete(tc);
|
||||||
|
Delete(tl);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* A C++ --- > C Extern */
|
/* A C++ --- > C Extern */
|
||||||
|
|
@ -425,15 +442,6 @@ static void dump_nested(char *parent) {
|
||||||
Status = oldstatus;
|
Status = oldstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DOHList *typelist(Parm *p) {
|
|
||||||
DOHList *l = NewList();
|
|
||||||
while (p) {
|
|
||||||
Append(l,Gettype(p));
|
|
||||||
p = Getnext(p);
|
|
||||||
}
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
/* The type of each node in the parse tree
|
/* The type of each node in the parse tree
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue