Revision: 651
http://rpy.svn.sourceforge.net/rpy/?rev=651&view=rev
Author: lgautier
Date: 2008-09-07 10:51:28 +0000 (Sun, 07 Sep 2008)
Log Message:
-----------
- rinterface.str_typeint() was causing segfault when called with
99
- (tentative) fix for subsetting LANGSXP objects
Modified Paths:
--------------
branches/rpy_nextgen/NEWS
branches/rpy_nextgen/rpy/rinterface/rinterface.c
branches/rpy_nextgen/rpy/rinterface/tests/test_EmbeddedR.py
Modified: branches/rpy_nextgen/NEWS
===================================================================
--- branches/rpy_nextgen/NEWS 2008-09-04 13:41:55 UTC (rev 650)
+++ branches/rpy_nextgen/NEWS 2008-09-07 10:51:28 UTC (rev 651)
@@ -37,7 +37,11 @@
- added a MANIFEST.in ensuring that headers get included in the source
distribution
+- :func:`rinterface.str_typeint` was causing segfault when called with 99
+- fixed subsetting for LANGSXP objects
+
+
Release 2.0.0a3
===============
Modified: branches/rpy_nextgen/rpy/rinterface/rinterface.c
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-09-04 13:41:55 UTC
(rev 650)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-09-07 10:51:28 UTC
(rev 651)
@@ -683,7 +683,7 @@
return PyBool_FromLong(same);
}
PyDoc_STRVAR(Sexp_rsame_doc,
- "Are the two object representing the same underlying R object.");
+ "Is the given object representing the same underlying R object as
the instance.");
static PyMethodDef Sexp_methods[] = {
@@ -1449,6 +1449,7 @@
break;
case LANGSXP:
tmp = nthcdr(*sexp, i_R);
+ sexp_item = allocVector(LANGSXP, 1);
SETCAR(sexp_item, CAR(tmp));
SET_TAG(sexp_item, TAG(tmp));
res = (PyObject *)newPySexpObject(sexp_item);
@@ -2352,7 +2353,7 @@
const char *sexp_type = validSexpType[sexp_i];
- if ((sexp_i < 0) || (sexp_i > maxValidSexpType) || (! sexp_type)) {
+ if ((sexp_i < 0) || (sexp_i >= maxValidSexpType) || (! sexp_type)) {
PyErr_Format(PyExc_LookupError, "'%i' is not a valid SEXP value.", sexp_i);
return NULL;
Modified: branches/rpy_nextgen/rpy/rinterface/tests/test_EmbeddedR.py
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/tests/test_EmbeddedR.py 2008-09-04
13:41:55 UTC (rev 650)
+++ branches/rpy_nextgen/rpy/rinterface/tests/test_EmbeddedR.py 2008-09-07
10:51:28 UTC (rev 651)
@@ -38,7 +38,10 @@
t = rinterface.baseNameSpaceEnv['pi']
self.assertEquals('REALSXP', rinterface.str_typeint(t.typeof))
+ def testStr_typeint_invalid(self):
+ self.assertRaises(LookupError, rinterface.str_typeint, 99)
+
class ObjectDispatchTestCase(unittest.TestCase):
def testObjectDispatchLang(self):
formula = rinterface.globalEnv.get('formula')
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