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)");
40 InterpreterUnlocker l;
41 ob=convertCppPyObject(edGetType(), data);
43 PyObject_Print(ob,stderr,Py_PRINT_RAW);
44 std::cerr << std::endl;
46 DEBTRACE( "ob refcnt: " << ob->ob_refcnt );
49 DEBTRACE( "ob refcnt: " << ob->ob_refcnt );
52 int isAdaptablePyObjectCpp(const TypeCode *t1, const TypeCode *t2)
54 return isAdaptablePyObjectNeutral(t1, t2);