Revision: 394
          http://rpy.svn.sourceforge.net/rpy/?rev=394&view=rev
Author:   warnes
Date:     2008-01-02 09:57:04 -0800 (Wed, 02 Jan 2008)

Log Message:
-----------
Add code to export 'Robj' type

Modified Paths:
--------------
    trunk/rpy/rpy.py
    trunk/rpy/src/rpymodule.c

Modified: trunk/rpy/rpy.py
===================================================================
--- trunk/rpy/rpy.py    2008-01-02 17:34:28 UTC (rev 393)
+++ trunk/rpy/rpy.py    2008-01-02 17:57:04 UTC (rev 394)
@@ -181,6 +181,7 @@
 # for backwards compatibility
 RException = RPyException
 
+Robj = _rpy.Robj
 
 
 # I/O setters

Modified: trunk/rpy/src/rpymodule.c
===================================================================
--- trunk/rpy/src/rpymodule.c   2008-01-02 17:34:28 UTC (rev 393)
+++ trunk/rpy/src/rpymodule.c   2008-01-02 17:57:04 UTC (rev 394)
@@ -1899,7 +1899,16 @@
   Robj_Type.tp_alloc = PyType_GenericAlloc;
 #endif
 
-  m = Py_InitModule(xstr(RPY_SHNAME), rpy_methods);
+  /* Initialize the module with its content */
+  if (PyType_Ready(&Robj_Type) < 0)
+    return;
+  m = Py_InitModule3(xstr(RPY_SHNAME), 
+                    rpy_methods,
+                    "Python interface to the R Programming Language");
+  Py_INCREF(&Robj_Type);
+  PyModule_AddObject(m, Robj_Type.tp_name, 
+                    (PyObject *)&Robj_Type);
+
   d = PyModule_GetDict(m);
 
   /* Save this interpreter */


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 2005.
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

Reply via email to