Debian Codegraph @

pypy/module/cpyext/parse/cpyext_datetime.h

raw symbols SCIP
1 /* Define structure for C API. */
2 typedef struct {
3 /* type objects */
4 PyTypeObject *DateType;
5 PyTypeObject *DateTimeType;
6 PyTypeObject *TimeType;
7 PyTypeObject *DeltaType;
8 PyTypeObject *TZInfoType;
9
10 /* singletons */
11 PyObject *TimeZone_UTC;
12
13 /* constructors */
14 PyObject *(*Date_FromDate)(int, int, int, PyTypeObject*);
15 PyObject *(*DateTime_FromDateAndTime)(int, int, int, int, int, int, int,
16 PyObject*, PyTypeObject*);
17 PyObject *(*Time_FromTime)(int, int, int, int, PyObject*, PyTypeObject*);
18 PyObject *(*Delta_FromDelta)(int, int, int, int, PyTypeObject*);
19 PyObject *(*TimeZone_FromTimeZone)(PyObject*, PyObject*);
20
21 /* constructors for the DB API */
22 PyObject *(*DateTime_FromTimestamp)(PyObject*, PyObject*, PyObject*);
23 PyObject *(*Date_FromTimestamp)(PyObject*, PyObject*);
24
25 /* PEP 495 constructors */
26 PyObject *(*DateTime_FromDateAndTimeAndFold)(int, int, int, int, int, int, int,
27 PyObject*, int, PyTypeObject*);
28 PyObject *(*Time_FromTimeAndFold)(int, int, int, int, PyObject*, int, PyTypeObject*);
29
30 } PyDateTime_CAPI;
31
32 typedef struct
33 {
34 PyObject_HEAD
35 int days; /* -MAX_DELTA_DAYS <= days <= MAX_DELTA_DAYS */
36 int seconds; /* 0 <= seconds < 24*3600 is invariant */
37 int microseconds; /* 0 <= microseconds < 1000000 is invariant */
38 } PyDateTime_Delta;
39
40 /* The datetime and time types have an optional tzinfo member,
41 * PyNone if hastzinfo is false.
42 */
43 typedef struct
44 {
45 PyObject_HEAD
46 unsigned char hastzinfo;
47 PyObject *tzinfo;
48 } PyDateTime_Time;
49
50 typedef struct
51 {
52 PyObject_HEAD
53 unsigned char hastzinfo;
54 PyObject *tzinfo;
55 } PyDateTime_DateTime;
56
57
58 typedef struct {
59 PyObject_HEAD
60 } PyDateTime_Date;
61
62
63 typedef struct {
64 PyObject_HEAD
65 } PyDateTime_TZInfo;
66