Show More
@@ -169,6 +169,11 b' static PyMethodDef dirstatetuple_methods' | |||||
169 | {NULL} /* Sentinel */ |
|
169 | {NULL} /* Sentinel */ | |
170 | }; |
|
170 | }; | |
171 |
|
171 | |||
|
172 | static PyObject *dirstatetuple_get_mode(dirstateTupleObject *self) | |||
|
173 | { | |||
|
174 | return PyInt_FromLong(self->mode); | |||
|
175 | }; | |||
|
176 | ||||
172 | static PyObject *dirstatetuple_get_state(dirstateTupleObject *self) |
|
177 | static PyObject *dirstatetuple_get_state(dirstateTupleObject *self) | |
173 | { |
|
178 | { | |
174 | return PyBytes_FromStringAndSize(&self->state, 1); |
|
179 | return PyBytes_FromStringAndSize(&self->state, 1); | |
@@ -238,6 +243,7 b' static PyObject *dirstatetuple_get_remov' | |||||
238 | }; |
|
243 | }; | |
239 |
|
244 | |||
240 | static PyGetSetDef dirstatetuple_getset[] = { |
|
245 | static PyGetSetDef dirstatetuple_getset[] = { | |
|
246 | {"mode", (getter)dirstatetuple_get_mode, NULL, "mode", NULL}, | |||
241 | {"state", (getter)dirstatetuple_get_state, NULL, "state", NULL}, |
|
247 | {"state", (getter)dirstatetuple_get_state, NULL, "state", NULL}, | |
242 | {"tracked", (getter)dirstatetuple_get_tracked, NULL, "tracked", NULL}, |
|
248 | {"tracked", (getter)dirstatetuple_get_tracked, NULL, "tracked", NULL}, | |
243 | {"added", (getter)dirstatetuple_get_added, NULL, "added", NULL}, |
|
249 | {"added", (getter)dirstatetuple_get_added, NULL, "added", NULL}, |
@@ -1307,7 +1307,7 b' class dirstate(object):' | |||||
1307 | # general. That is much slower than simply accessing and storing the |
|
1307 | # general. That is much slower than simply accessing and storing the | |
1308 | # tuple members one by one. |
|
1308 | # tuple members one by one. | |
1309 | t = dget(fn) |
|
1309 | t = dget(fn) | |
1310 |
mode = t |
|
1310 | mode = t.mode | |
1311 | size = t[2] |
|
1311 | size = t[2] | |
1312 | time = t[3] |
|
1312 | time = t[3] | |
1313 |
|
1313 |
General Comments 0
You need to be logged in to leave comments.
Login now