equal
deleted
inserted
replaced
61 PyObject_HEAD |
61 PyObject_HEAD |
62 struct stat st; |
62 struct stat st; |
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) |
74 listdir_slot(st_nlink) |
82 listdir_slot(st_nlink) |
75 #ifdef _WIN32 |
83 #ifdef _WIN32 |