Revision: 624
http://rpy.svn.sourceforge.net/rpy/?rev=624&view=rev
Author: lgautier
Date: 2008-08-09 18:08:45 +0000 (Sat, 09 Aug 2008)
Log Message:
-----------
Catch attempts at creating vectors while R is not initialized
(no longer segfault)
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-08-08 18:49:58 UTC
(rev 623)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-08-09 18:08:45 UTC
(rev 624)
@@ -305,9 +305,6 @@
/* --- Initialize and terminate an embedded R --- */
-/* Should having multiple threads of R become possible,
- * useful routines could appear here...
- */
static PyObject* EmbeddedR_init(PyObject *self)
{
@@ -1485,6 +1482,12 @@
printf("%p: VectorSexp initializing...\n", self);
#endif
+ if (! (embeddedR_status & RPY_R_INITIALIZED)) {
+ PyErr_Format(PyExc_RuntimeError,
+ "R must be initialized before any instance can be created.");
+ return -1;
+ }
+
PyObject *object;
int sexptype = -1;
PyObject *copy;
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