From: Zaur Shibzukhov Date: Sun, 3 Mar 2013 13:38:11 +0000 (+0300) Subject: Add function `import_datetime` X-Git-Tag: 0.19b1~104^2~2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7596ff42705d78574602cf7fb82bd32963865bb5;p=platform%2Fupstream%2Fpython-cython.git Add function `import_datetime` Add inline function `import_datetime` for initialization of PyDateTime C API. --- diff --git a/Cython/Includes/cpython/datetime.pxd b/Cython/Includes/cpython/datetime.pxd index 60939dd..9ec1ee8 100644 --- a/Cython/Includes/cpython/datetime.pxd +++ b/Cython/Includes/cpython/datetime.pxd @@ -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):