@@ -78,6 +78,25 @@ object_hasattrstringwitherror(PyObject *self, PyObject *args)
7878    RETURN_INT (PyObject_HasAttrStringWithError (obj , attr_name ));
7979}
8080
81+ static  PyObject  * 
82+ object_copy_to_object (PyObject  * self , PyObject  * args )
83+ {
84+     PyObject  * obj ;
85+     Py_ssize_t  len ;
86+     int  result ;
87+     char  * buf , fort ;
88+ 
89+     if  (!PyArg_ParseTuple (args , "Os#C" , & obj , & buf , & len , & fort )) {
90+         return  NULL ;
91+     }
92+     result  =  PyObject_CopyToObject (obj , buf , len , fort );
93+     if  (result  <  0 ) {
94+         return  NULL ;
95+     }
96+     Py_INCREF (obj );
97+     return  obj ;
98+ }
99+ 
81100static  PyObject  * 
82101mapping_getoptionalitemstring (PyObject  * self , PyObject  * args )
83102{
@@ -162,6 +181,8 @@ static PyMethodDef test_methods[] = {
162181    {"object_getoptionalattrstring" , object_getoptionalattrstring , METH_VARARGS },
163182    {"object_hasattrwitherror" , object_hasattrwitherror , METH_VARARGS },
164183    {"object_hasattrstringwitherror" , object_hasattrstringwitherror , METH_VARARGS },
184+     {"object_copy_to_object" , object_copy_to_object , METH_VARARGS },
185+ 
165186    {"mapping_getoptionalitem" , mapping_getoptionalitem , METH_VARARGS },
166187    {"mapping_getoptionalitemstring" , mapping_getoptionalitemstring , METH_VARARGS },
167188
0 commit comments