##// END OF EJS Templates
osutil: use PyLongObject on Python 3 for listdir_slot...
Gregory Szorc -
r30111:a989fa78 default
parent child Browse files
Show More
@@ -63,11 +63,19 b' struct listdir_stat {'
63 };
63 };
64 #endif
64 #endif
65
65
66 #ifdef IS_PY3K
67 #define listdir_slot(name) \
68 static PyObject *listdir_stat_##name(PyObject *self, void *x) \
69 { \
70 return PyLong_FromLong(((struct listdir_stat *)self)->st.name); \
71 }
72 #else
66 #define listdir_slot(name) \
73 #define listdir_slot(name) \
67 static PyObject *listdir_stat_##name(PyObject *self, void *x) \
74 static PyObject *listdir_stat_##name(PyObject *self, void *x) \
68 { \
75 { \
69 return PyInt_FromLong(((struct listdir_stat *)self)->st.name); \
76 return PyInt_FromLong(((struct listdir_stat *)self)->st.name); \
70 }
77 }
78 #endif
71
79
72 listdir_slot(st_dev)
80 listdir_slot(st_dev)
73 listdir_slot(st_mode)
81 listdir_slot(st_mode)
General Comments 0
You need to be logged in to leave comments. Login now