Commit 7596ff42 authored by Zaur Shibzukhov's avatar Zaur Shibzukhov

Add function `import_datetime`

Add inline function `import_datetime` for initialization of PyDateTime C API.
parent 2076c9a6
......@@ -97,11 +97,13 @@ cdef extern from "datetime.h":
# PyDateTime CAPI object.
PyDateTime_CAPI *PyDateTimeAPI
# Datetime C API object initialization C macros.
# You have to call this before any usage of DateTime CAPI functions:
# PyDateTime_IMPORT
void PyDateTime_IMPORT()
# Datetime C API initialization function.
# You have to call it before any usage of DateTime CAPI functions.
cdef inline import_datetime():
PyDateTime_IMPORT
# Create date object using DateTime CAPI factory function.
# Note, there are no range checks for any of the arguments.
cdef inline object date_new(int year, int month, int day):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment