Revision: 413
http://rpy.svn.sourceforge.net/rpy/?rev=413&view=rev
Author: lgautier
Date: 2008-03-03 13:30:49 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
- fixed when calling SexpClosure with named arguments
- more doc
- handle SPECIALSXP as closures (not certain this is completely correct,
but it lets me experiment a bit with those)
Modified Paths:
--------------
trunk/sandbox/rpy_nextgen/rinterface/rinterface.c
Modified: trunk/sandbox/rpy_nextgen/rinterface/rinterface.c
===================================================================
--- trunk/sandbox/rpy_nextgen/rinterface/rinterface.c 2008-03-03 21:28:08 UTC
(rev 412)
+++ trunk/sandbox/rpy_nextgen/rinterface/rinterface.c 2008-03-03 21:30:49 UTC
(rev 413)
@@ -65,9 +65,12 @@
#include <signal.h>
-//FIXME: get this out ASAP
-#define VERBOSE
+/* Back-compatibility with Python 2.4 */
+#if (PY_VERSION_HEX < 0x02050000)
+typedef int Py_ssize_t;
+#endif
+
//FIXME: see the details of error handling
static PyObject *ErrorObject;
@@ -455,6 +458,7 @@
SET_TAG(c_R, install(argNameString));
//printf("PyMem_Free...");
//PyMem_Free(argNameString);
+ c_R = CDR(c_R);
}
Py_XDECREF(citems);
@@ -778,9 +782,9 @@
return NULL;
}
PyDoc_STRVAR(EnvironmentSexp_subscript_doc,
- "Find an R object in the environment.\
- Not all R environment are hash tables, and this may\n\
-influence performances when doing repeated lookups.");
+ "Find an R object in the environment.\n\
+ Not all R environment are hash tables, and this may\
+ influence performances when doing repeated lookups.");
//FIXME: Is this still needed ?
static PyMappingMethods EnvironmentSexp_mappignMethods = {
@@ -919,14 +923,8 @@
//FIXME: let the possibility to manipulate un-evaluated promises ?
if (TYPEOF(sexp) == PROMSXP) {
- #ifdef VERBOSE
- printf("evaluating promise...");
- #endif
env_R = PRENV(sexp);
sexp_ok = eval(sexp, env_R);
- #ifdef VERBOSE
- printf("done.\n");
- #endif
}
else {
sexp_ok = sexp;
@@ -937,15 +935,10 @@
switch (TYPEOF(sexp_ok)) {
case CLOSXP:
case BUILTINSXP:
+ case SPECIALSXP:
object = (SexpObject *)_PyObject_New(&ClosureSexp_Type);
break;
- //FIXME: handle other callable types ?
- //case SPECIALSXP:
- //callable type
- //break;
- //case BUILTINSXP:
- //callable type
- //break;
+ //FIXME: BUILTINSXP and SPECIALSXP really like CLOSXP ?
case REALSXP:
case INTSXP:
case LGLSXP:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list