#include "ptor.h" VALUE ptor_string(PyObject* pString) { if(!PyString_Check(pString)) return Qnil; char *cstr; cstr=malloc(PyString_Size(pString)*sizeof(char)); strcpy(cstr,PyString_AsString(pString)); return rb_str_new2(cstr); } VALUE ptor_list(PyObject* pList) { if(!PyList_Check(pList)) return Qnil; VALUE rArray; VALUE rElement; PyObject* element; int i=0; rArray=rb_ary_new(); int list_size=PyList_Size(pList); for(i=0;i