#include "rtop.h" RUBY_EXTERN VALUE cRubyPyObject; RUBY_EXTERN PyObject* rp_obj_pobject(VALUE self); PyObject* rtop_string(VALUE rString) { PyObject* pString; char *cString; char *cStringCopy; cString=STR2CSTR(rString); cStringCopy=malloc(strlen(cString)*sizeof(char)); strcpy(cStringCopy,cString); pString=PyString_FromString(cStringCopy); return pString; } PyObject* rtop_array_list(VALUE rArray) { PyObject* pList; int size=RARRAY_LEN(rArray); pList=PyList_New(size); int i; for(i=0;i