From: <dr...@us...> - 2008-02-12 06:16:24
|
Revision: 10247 http://swig.svn.sourceforge.net/swig/?rev=10247&view=rev Author: drjoe Date: 2008-02-11 22:16:20 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Set S4 flag which should fix the problem in R 2.6 that some S4 methods are not working. Remove 2.6 warning Modified Paths: -------------- trunk/Lib/r/rrun.swg Modified: trunk/Lib/r/rrun.swg =================================================================== --- trunk/Lib/r/rrun.swg 2008-02-11 03:11:18 UTC (rev 10246) +++ trunk/Lib/r/rrun.swg 2008-02-12 06:16:20 UTC (rev 10247) @@ -19,8 +19,6 @@ #define SWIGR 1 #if R_VERSION >= R_Version(2,6,0) -#warning "R Swig currently fails on runtime for 2.6 and higher." -#warning "Contact maintainer if you would like to help fix" #define VMAXTYPE void * #define RVERSION26(x) x #define RVERSIONPRE26(x) @@ -231,7 +229,7 @@ R_RegisterCFinalizer(external, R_SWIG_ReferenceFinalizer); r_obj = SET_SLOT(r_obj, Rf_mkString((char *) "ref"), external); - + SET_S4_OBJECT(r_obj); Rf_unprotect(2); return(r_obj); @@ -248,8 +246,8 @@ Rf_protect(arr = R_do_slot_assign(arr, Rf_mkString("ref"), ref)); Rf_protect(arr = R_do_slot_assign(arr, Rf_mkString("dims"), Rf_ScalarInteger(len))); - Rf_unprotect(3); - + Rf_unprotect(3); + SET_S4_OBJECT(arr); return arr; } @@ -268,6 +266,7 @@ SWIG_R_NewPointerObj(void *ptr, swig_type_info *type, int flags) { SEXP rptr = R_MakeExternalPtr(ptr, R_MakeExternalPtr(type, R_NilValue, R_NilValue), R_NilValue); + SET_S4_OBJECT(rptr); // rptr = Rf_setAttrib(rptr, R_ClassSymbol, mkChar(SWIG_TypeName(type))); return rptr; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |