//------------------------------------------------------------------------------------- PyObject* Proxy::pyGiveClientTo(PyObject* pyOterProxy) { if(this->isDestroyed()) { PyErr_Format(PyExc_AssertionError, "%s: %d is destroyed!\n", scriptName(), id()); PyErr_PrintEx(0); return 0; } if (pyOterProxy == NULL || !PyObject_TypeCheck(pyOterProxy, Proxy::getScriptType())) { PyErr_Format(PyExc_AssertionError, "%s[%d]::giveClientTo: arg1 not is Proxy!\n", scriptName(), id()); PyErr_PrintEx(0); return 0; } // 如果为None 则设置为NULL Proxy* oterProxy = NULL; if(pyOterProxy != Py_None) oterProxy = static_cast<Proxy*>(pyOterProxy); giveClientTo(oterProxy); S_Return; }
//------------------------------------------------------------------------------------- PyObject* Proxy::pyGiveClientTo(PyObject* pyOterProxy) { // 如果为None 则设置为NULL Proxy* oterProxy = NULL; if(pyOterProxy != Py_None) oterProxy = static_cast<Proxy*>(pyOterProxy); giveClientTo(oterProxy); S_Return; }
//------------------------------------------------------------------------------------- PyObject* Proxy::pyGiveClientTo(PyObject* pyOterProxy) { if(this->isDestroyed()) { PyErr_Format(PyExc_AssertionError, "%s: %d is destroyed!\n", getScriptName(), getID()); PyErr_PrintEx(0); return 0; } // 如果为None 则设置为NULL Proxy* oterProxy = NULL; if(pyOterProxy != Py_None) oterProxy = static_cast<Proxy*>(pyOterProxy); giveClientTo(oterProxy); S_Return; }