this repo has no description
1/* Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) */
2#pragma once
3
4#include "Python.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10PyAPI_FUNC_DECL(void* PyDateTimeAPI_Func(void));
11PyAPI_FUNC_DECL(int PyDateTime_Check_Func(PyObject*));
12
13PyAPI_FUNC_DECL(int PyDateTime_DATE_GET_HOUR_Func(PyObject*));
14PyAPI_FUNC_DECL(int PyDateTime_DATE_GET_MICROSECOND_Func(PyObject*));
15PyAPI_FUNC_DECL(int PyDateTime_DATE_GET_MINUTE_Func(PyObject*));
16PyAPI_FUNC_DECL(int PyDateTime_DATE_GET_SECOND_Func(PyObject*));
17
18PyAPI_FUNC_DECL(int PyDateTime_DELTA_GET_DAYS_Func(PyObject*));
19PyAPI_FUNC_DECL(int PyDateTime_DELTA_GET_MICROSECONDS_Func(PyObject*));
20PyAPI_FUNC_DECL(int PyDateTime_DELTA_GET_SECONDS_Func(PyObject*));
21
22PyAPI_FUNC_DECL(PyObject* PyDateTime_FromDateAndTime_Func(int, int, int, int,
23 int, int, int));
24PyAPI_FUNC_DECL(int PyDateTime_GET_DAY_Func(PyObject*));
25PyAPI_FUNC_DECL(int PyDateTime_GET_MONTH_Func(PyObject*));
26PyAPI_FUNC_DECL(int PyDateTime_GET_YEAR_Func(PyObject*));
27
28PyAPI_FUNC_DECL(void PyDateTime_IMPORT_Func(void));
29
30PyAPI_FUNC_DECL(int PyDateTime_TIME_GET_HOUR_Func(PyObject*));
31PyAPI_FUNC_DECL(int PyDateTime_TIME_GET_MICROSECOND_Func(PyObject*));
32PyAPI_FUNC_DECL(int PyDateTime_TIME_GET_MINUTE_Func(PyObject*));
33PyAPI_FUNC_DECL(int PyDateTime_TIME_GET_SECOND_Func(PyObject*));
34
35PyAPI_FUNC_DECL(int PyDate_Check_Func(PyObject*));
36PyAPI_FUNC_DECL(PyObject* PyDate_FromDate_Func(int year, int month, int day));
37PyAPI_FUNC_DECL(int PyDelta_Check_Func(PyObject*));
38PyAPI_FUNC_DECL(PyObject* PyDelta_FromDSU_Func(int, int, int));
39
40PyAPI_FUNC_DECL(int PyTime_Check_Func(PyObject*));
41
42#define PyDateTimeAPI (PyDateTimeAPI_Func())
43#define PyDateTime_Check(op) (PyDateTime_Check_Func((PyObject*)(op)))
44#define PyDateTime_DATE_GET_HOUR(op) \
45 (PyDateTime_DATE_GET_HOUR_Func((PyObject*)(op)))
46#define PyDateTime_DATE_GET_MICROSECOND(op) \
47 (PyDateTime_DATE_GET_MICROSECOND_Func((PyObject*)(op)))
48#define PyDateTime_DATE_GET_MINUTE(op) \
49 (PyDateTime_DATE_GET_MINUTE_Func((PyObject*)(op)))
50#define PyDateTime_DATE_GET_SECOND(op) \
51 (PyDateTime_DATE_GET_SECOND_Func((PyObject*)(op)))
52#define PyDateTime_DELTA_GET_DAYS(op) \
53 (PyDateTime_DELTA_GET_DAYS_Func((PyObject*)(op)))
54#define PyDateTime_DELTA_GET_MICROSECONDS(op) \
55 (PyDateTime_DELTA_GET_MICROSECONDS_Func((PyObject*)(op)))
56#define PyDateTime_DELTA_GET_SECONDS(op) \
57 (PyDateTime_DELTA_GET_SECONDS_Func((PyObject*)(op)))
58#define PyDateTime_FromDateAndTime(year, month, day, hour, min, sec, usec) \
59 (PyDateTime_FromDateAndTime_Func((year), (month), (day), (hour), (min), \
60 (sec), (usec)))
61#define PyDateTime_GET_DAY(op) (PyDateTime_GET_DAY_Func((PyObject*)(op)))
62#define PyDateTime_GET_MONTH(op) (PyDateTime_GET_MONTH_Func((PyObject*)(op)))
63#define PyDateTime_GET_YEAR(op) (PyDateTime_GET_YEAR_Func((PyObject*)(op)))
64#define PyDateTime_IMPORT (PyDateTime_IMPORT_Func())
65#define PyDateTime_TIME_GET_HOUR(op) \
66 (PyDateTime_TIME_GET_HOUR_Func((PyObject*)(op)))
67#define PyDateTime_TIME_GET_MICROSECOND(op) \
68 (PyDateTime_TIME_GET_MICROSECOND_Func((PyObject*)(op)))
69#define PyDateTime_TIME_GET_MINUTE(op) \
70 (PyDateTime_TIME_GET_MINUTE_Func((PyObject*)(op)))
71#define PyDateTime_TIME_GET_SECOND(op) \
72 (PyDateTime_TIME_GET_SECOND_Func((PyObject*)(op)))
73#define PyDate_Check(op) (PyDate_Check_Func((PyObject*)(op)))
74#define PyDate_FromDate(year, month, day) \
75 (PyDate_FromDate_Func((year), (month), (day)))
76#define PyDelta_Check(op) (PyDelta_Check_Func((PyObject*)(op)))
77#define PyDelta_FromDSU(days, seconds, useconds) \
78 (PyDelta_FromDSU_Func((days), (seconds), (useconds)))
79
80#define PyTime_Check(op) (PyTime_Check_Func((PyObject*)(op)))
81
82#ifdef __cplusplus
83}
84#endif