@@ -453,37 +453,6 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj)
453453 return Py_BuildValue ("(iii)" , days , seconds , microseconds );
454454}
455455
456- static PyObject *
457- get_capi_types (PyObject * self , PyObject * args )
458- {
459- if (PyDateTimeAPI == NULL ) {
460- Py_RETURN_NONE ;
461- }
462- PyObject * dict = PyDict_New ();
463- if (dict == NULL ) {
464- return NULL ;
465- }
466- if (PyDict_SetItemString (dict , "date" , (PyObject * )PyDateTimeAPI -> DateType ) < 0 ) {
467- goto error ;
468- }
469- if (PyDict_SetItemString (dict , "time" , (PyObject * )PyDateTimeAPI -> TimeType ) < 0 ) {
470- goto error ;
471- }
472- if (PyDict_SetItemString (dict , "datetime" , (PyObject * )PyDateTimeAPI -> DateTimeType ) < 0 ) {
473- goto error ;
474- }
475- if (PyDict_SetItemString (dict , "timedelta" , (PyObject * )PyDateTimeAPI -> DeltaType ) < 0 ) {
476- goto error ;
477- }
478- if (PyDict_SetItemString (dict , "tzinfo" , (PyObject * )PyDateTimeAPI -> TZInfoType ) < 0 ) {
479- goto error ;
480- }
481- return dict ;
482- error :
483- Py_DECREF (dict );
484- return NULL ;
485- }
486-
487456static PyMethodDef test_methods [] = {
488457 {"PyDateTime_DATE_GET" , test_PyDateTime_DATE_GET , METH_O },
489458 {"PyDateTime_DELTA_GET" , test_PyDateTime_DELTA_GET , METH_O },
@@ -504,7 +473,6 @@ static PyMethodDef test_methods[] = {
504473 {"get_time_fromtimeandfold" , get_time_fromtimeandfold , METH_VARARGS },
505474 {"get_timezone_utc_capi" , get_timezone_utc_capi , METH_VARARGS },
506475 {"get_timezones_offset_zero" , get_timezones_offset_zero , METH_NOARGS },
507- {"get_capi_types" , get_capi_types , METH_NOARGS },
508476 {"make_timezones_capi" , make_timezones_capi , METH_NOARGS },
509477 {"test_datetime_capi" , test_datetime_capi , METH_NOARGS },
510478 {NULL },
0 commit comments