|
|
|
@ -3382,6 +3382,18 @@ return_result_with_error(PyObject *self, PyObject *args) |
|
|
|
Py_RETURN_NONE; |
|
|
|
} |
|
|
|
|
|
|
|
static PyObject * |
|
|
|
test_pytime_fromseconds(PyObject *self, PyObject *args) |
|
|
|
{ |
|
|
|
int seconds; |
|
|
|
_PyTime_t ts; |
|
|
|
|
|
|
|
if (!PyArg_ParseTuple(args, "i", &seconds)) |
|
|
|
return NULL; |
|
|
|
ts = _PyTime_FromSeconds(seconds); |
|
|
|
return _PyTime_AsNanosecondsObject(ts); |
|
|
|
} |
|
|
|
|
|
|
|
static PyObject * |
|
|
|
test_pytime_fromsecondsobject(PyObject *self, PyObject *args) |
|
|
|
{ |
|
|
|
@ -3651,6 +3663,7 @@ static PyMethodDef TestMethods[] = { |
|
|
|
return_null_without_error, METH_NOARGS}, |
|
|
|
{"return_result_with_error", |
|
|
|
return_result_with_error, METH_NOARGS}, |
|
|
|
{"PyTime_FromSeconds", test_pytime_fromseconds, METH_VARARGS}, |
|
|
|
{"PyTime_FromSecondsObject", test_pytime_fromsecondsobject, METH_VARARGS}, |
|
|
|
{"PyTime_AsSecondsDouble", test_pytime_assecondsdouble, METH_VARARGS}, |
|
|
|
{"PyTime_AsTimeval", test_PyTime_AsTimeval, METH_VARARGS}, |
|
|
|
|