2 #include "CppPythonConv.hxx"
3 #include "TypeConversions.hxx"
8 #include "YacsTrace.hxx"
17 PyObject *convertCppPyObject(const TypeCode *t, Any *a)
19 return convertNeutralPyObject(t, (Any *) a);
22 CppPy::CppPy(InputPyPort* p)
23 : ProxyPort(p), DataPort(p->getName(), p->getNode(), p->edGetType()), Port(p->getNode())
27 //!Convert the received C++ value to PyObject * and send it to proxy port
29 * \param data : C++ value received
31 void CppPy::put(const void *data) throw(ConversionException)
36 void CppPy::put(Any *data) throw(ConversionException)
38 DEBTRACE(" CppPython::put(Any *data)");
41 InterpreterUnlocker l;
42 ob=convertCppPyObject(edGetType(), data);
43 PyObject_Print(ob,stderr,Py_PRINT_RAW);
44 DEBTRACE( "ob refcnt: " << ob->ob_refcnt );
48 DEBTRACE( "ob refcnt: " << ob->ob_refcnt );
51 int isAdaptablePyObjectCpp(const TypeCode *t1, const TypeCode *t2)
53 return isAdaptablePyObjectNeutral(t1, t2);