Fixed the void* bug. Thanks to Matthias.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d7750bf12f
commit
efca43aaa7
1 changed files with 17 additions and 11 deletions
|
|
@ -478,19 +478,25 @@ void CFFI :: emit_struct_union(Node *n, bool un=false) {
|
||||||
// SWIG_exit(EXIT_FAILURE);
|
// SWIG_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
String *temp=Copy(Getattr(c,"decl"));
|
// String *temp=Copy(Getattr(c,"decl"));
|
||||||
Append(temp,Getattr(c,"type")); //appending type to the end, otherwise wrong type
|
// Append(temp,Getattr(c,"type")); //appending type to the end, otherwise wrong type
|
||||||
String *lisp_type=Swig_typemap_lookup_new("cin",c, "",0);
|
// String *lisp_type=Swig_typemap_lookup_new("cin",c, "",0);
|
||||||
Delete(temp);
|
// Delete(temp);
|
||||||
|
SwigType *childType=NewStringf("%s%s", Getattr(c,"decl"),
|
||||||
|
Getattr(c,"type"));
|
||||||
|
|
||||||
String *slot_name = Getattr(c, "sym:name");
|
Hash *typemap = Swig_typemap_search("cin", childType,"", 0);
|
||||||
Printf(f_cl,
|
String *typespec = NewString("");
|
||||||
"\n\t(%s %s)",
|
if (typemap) {
|
||||||
slot_name,
|
typespec=Getattr(typemap, "code");
|
||||||
lisp_type);
|
}
|
||||||
|
|
||||||
Delete(lisp_type);
|
String *slot_name = Getattr(c, "sym:name");
|
||||||
}
|
Printf(f_cl, "\n\t(%s %s)", slot_name, typespec);
|
||||||
|
|
||||||
|
Delete(slot_name);
|
||||||
|
Delete(typespec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Printf(f_cl, ")\n");
|
Printf(f_cl, ")\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue