Revision: 431 http://rpy.svn.sourceforge.net/rpy/?rev=431&view=rev Author: lgautier Date: 2008-03-14 15:10:33 -0700 (Fri, 14 Mar 2008)
Log Message: ----------- - do_eval_expr now needs an environment (where to evaluate the expression) - minor change in the doc Modified Paths: -------------- trunk/sandbox/rpy_nextgen/rpy/rinterface/rinterface.c Modified: trunk/sandbox/rpy_nextgen/rpy/rinterface/rinterface.c =================================================================== --- trunk/sandbox/rpy_nextgen/rpy/rinterface/rinterface.c 2008-03-13 21:28:10 UTC (rev 430) +++ trunk/sandbox/rpy_nextgen/rpy/rinterface/rinterface.c 2008-03-14 22:10:33 UTC (rev 431) @@ -284,7 +284,7 @@ } PyDoc_STRVAR(Sexp_typeof_doc, "\n\ -Returns the R internal SEXP type."); +Returns the R internal SEXPREC type."); static PyMethodDef Sexp_methods[] = { {"typeof", (PyCFunction)Sexp_typeof, METH_NOARGS, @@ -353,7 +353,7 @@ /* Evaluate a SEXP. It must be constructed by hand. It raises a Python exception if an error ocurred in the evaluation */ -SEXP do_eval_expr(SEXP expr_R) { +SEXP do_eval_expr(SEXP expr_R, SEXP env_R) { SEXP res_R = NULL; int error = 0; PyOS_sighandler_t old_int; @@ -376,7 +376,7 @@ interrupted = 0; //FIXME: evaluate expression in the given - res_R = R_tryEval(expr_R, R_GlobalEnv, &error); + res_R = R_tryEval(expr_R, env_R, &error); #ifdef _WIN32 PyOS_setsig(SIGBREAK, old_int); @@ -498,7 +498,7 @@ } //FIXME: R_GlobalContext ? - PROTECT(res_R = do_eval_expr(call_R)); + PROTECT(res_R = do_eval_expr(call_R, R_GlobalEnv)); /* if (!res) { */ /* UNPROTECT(2); */ 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 rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list