Apply patch from Petr Viktorin to fix some recent regressions in CFFI/CLOS
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10487 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bfb5a0989b
commit
8b42082f88
2 changed files with 6 additions and 5 deletions
|
|
@ -86,7 +86,7 @@
|
||||||
short, signed short, unsigned short,
|
short, signed short, unsigned short,
|
||||||
int, signed int, unsigned int,
|
int, signed int, unsigned int,
|
||||||
long, signed long, unsigned long,
|
long, signed long, unsigned long,
|
||||||
float, double, long double, char *, void *
|
float, double, long double, char *, void *,
|
||||||
enum SWIGTYPE, SWIGTYPE *,
|
enum SWIGTYPE, SWIGTYPE *,
|
||||||
SWIGTYPE[ANY], SWIGTYPE & "$result = $1;";
|
SWIGTYPE[ANY], SWIGTYPE & "$result = $1;";
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
@ -125,8 +125,9 @@
|
||||||
int, signed int, unsigned int,
|
int, signed int, unsigned int,
|
||||||
long, signed long, unsigned long,
|
long, signed long, unsigned long,
|
||||||
enum SWIGTYPE "cl:integer";
|
enum SWIGTYPE "cl:integer";
|
||||||
%typemap(lispclass) float "cl:single-float";
|
/* CLOS methods can't be specialized on single-float or double-float */
|
||||||
%typemap(lispclass) double "cl:double-float";
|
%typemap(lispclass) float "cl:number";
|
||||||
|
%typemap(lispclass) double "cl:number";
|
||||||
%typemap(lispclass) char * "cl:string";
|
%typemap(lispclass) char * "cl:string";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ int CFFI::functionWrapper(Node *n) {
|
||||||
String *result_convert = Swig_typemap_lookup_out("out", n, "result", f, actioncode);
|
String *result_convert = Swig_typemap_lookup_out("out", n, "result", f, actioncode);
|
||||||
Replaceall(result_convert, "$result", "lresult");
|
Replaceall(result_convert, "$result", "lresult");
|
||||||
Printf(f->code, "%s\n", result_convert);
|
Printf(f->code, "%s\n", result_convert);
|
||||||
Printf(f->code, " return lresult;\n");
|
if(!is_void_return) Printf(f->code, " return lresult;\n");
|
||||||
Delete(result_convert);
|
Delete(result_convert);
|
||||||
emit_return_variable(n, Getattr(n, "type"), f);
|
emit_return_variable(n, Getattr(n, "type"), f);
|
||||||
|
|
||||||
|
|
@ -673,7 +673,7 @@ void CFFI::emit_class(Node *n) {
|
||||||
|
|
||||||
Printf(supers, ")");
|
Printf(supers, ")");
|
||||||
Printf(f_clos, "\n(cl:defclass %s%s", lisp_name, supers);
|
Printf(f_clos, "\n(cl:defclass %s%s", lisp_name, supers);
|
||||||
Printf(f_clos, "\n ((ff :reader ff-pointer)))\n\n");
|
Printf(f_clos, "\n ((ff-pointer :reader ff-pointer)))\n\n");
|
||||||
|
|
||||||
Parm *pattern = NewParm(Getattr(n, "name"), NULL);
|
Parm *pattern = NewParm(Getattr(n, "name"), NULL);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue