AutoPyRef& operator=(const AutoPyRef& other) { if(_pyobj==other._pyobj) return *this; release(); _pyobj=other._pyobj; Py_XINCREF(_pyobj); return *this; }
operator PyObject *() { return _pyobj; }
void set(PyObject *pyobj) { if(pyobj==_pyobj) return ; release(); _pyobj=pyobj; }
PyObject *get() { return _pyobj; }
bool isNull() const { return _pyobj==0; }
PyObject *retn() { if(_pyobj) Py_XINCREF(_pyobj); return _pyobj; }
AutoPyRef& operator=(const AutoPyRef& other) { if(_pyobj==other._pyobj) return *this; release(); _pyobj=other._pyobj; Py_XINCREF(_pyobj); return *this; }
operator PyObject *() { return _pyobj; }
void set(PyObject *pyobj) { if(pyobj==_pyobj) return ; release(); _pyobj=pyobj; }
PyObject *get() { return _pyobj; }
bool isNull() const { return _pyobj==0; }
PyObject *retn() { if(_pyobj) Py_XINCREF(_pyobj); return _pyobj; }