Revision: 591
http://rpy.svn.sourceforge.net/rpy/?rev=591&view=rev
Author: lgautier
Date: 2008-07-24 14:02:34 +0000 (Thu, 24 Jul 2008)
Log Message:
-----------
rinterface:
- clear the "initialized" bit when ending R
- prevent the call of a function when R has been ended
Modified Paths:
--------------
branches/rpy_nextgen/rpy/rinterface/rinterface.c
Modified: branches/rpy_nextgen/rpy/rinterface/rinterface.c
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-07-24 13:17:52 UTC
(rev 590)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-07-24 14:02:34 UTC
(rev 591)
@@ -317,6 +317,8 @@
/* */
Rf_endEmbeddedR((int)fatal);
+ embeddedR_status = embeddedR_status & (! RPY_R_INITIALIZED);
+
RPY_SEXP(globalEnv) = R_EmptyEnv;
RPY_SEXP(baseNameSpaceEnv) = R_EmptyEnv;
GetErrMessage_SEXP = R_NilValue;
@@ -704,6 +706,12 @@
Sexp_call(PyObject *self, PyObject *args, PyObject *kwds)
{
+ if (! (embeddedR_status & RPY_R_INITIALIZED)) {
+ PyErr_Format(PyExc_RuntimeError,
+ "R must be initialized before any call to R functions is
possible.");
+ return NULL;
+ }
+
if (embeddedR_status & RPY_R_BUSY) {
PyErr_Format(PyExc_RuntimeError, "Concurrent access to R is not allowed.");
return NULL;
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list