summaryrefslogtreecommitdiffstats
path: root/Include/datetime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/datetime.h')
-rw-r--r--Include/datetime.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/datetime.h b/Include/datetime.h
index db57a18..41e3bcf 100644
--- a/Include/datetime.h
+++ b/Include/datetime.h
@@ -135,6 +135,12 @@ typedef struct
(((PyDateTime_Time*)o)->data[4] << 8) | \
((PyDateTime_Time*)o)->data[5])
+/* Apply for time delta instances */
+#define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
+#define PyDateTime_DELTA_GET_SECONDS(o) (((PyDateTime_Delta*)o)->seconds)
+#define PyDateTime_DELTA_GET_MICROSECONDS(o) \
+ (((PyDateTime_Delta*)o)->microseconds)
+
/* Define structure for C API. */
typedef struct {