##// END OF EJS Templates
dirstate-item: fix Cext declaration of dm_nonnormal and dm_otherparent...
marmoute -
r48702:37bffc45 default
parent child Browse files
Show More
@@ -142,23 +142,6 b' static PyObject *dirstate_item_v1_mtime('
142 142 return PyInt_FromLong(self->mtime);
143 143 };
144 144
145 static PyObject *dm_nonnormal(dirstateItemObject *self)
146 {
147 if (self->state != 'n' || self->mtime == ambiguous_time) {
148 Py_RETURN_TRUE;
149 } else {
150 Py_RETURN_FALSE;
151 }
152 };
153 static PyObject *dm_otherparent(dirstateItemObject *self)
154 {
155 if (self->size == dirstate_v1_from_p2) {
156 Py_RETURN_TRUE;
157 } else {
158 Py_RETURN_FALSE;
159 }
160 };
161
162 145 static PyObject *dirstate_item_need_delay(dirstateItemObject *self,
163 146 PyObject *value)
164 147 {
@@ -255,10 +238,6 b' static PyMethodDef dirstate_item_methods'
255 238 METH_NOARGS, "mark a file as \"possibly dirty\""},
256 239 {"set_untracked", (PyCFunction)dirstate_item_set_untracked, METH_NOARGS,
257 240 "mark a file as \"untracked\""},
258 {"dm_nonnormal", (PyCFunction)dm_nonnormal, METH_NOARGS,
259 "True is the entry is non-normal in the dirstatemap sense"},
260 {"dm_otherparent", (PyCFunction)dm_otherparent, METH_NOARGS,
261 "True is the entry is `otherparent` in the dirstatemap sense"},
262 241 {NULL} /* Sentinel */
263 242 };
264 243
@@ -345,6 +324,23 b' static PyObject *dirstate_item_get_remov'
345 324 }
346 325 };
347 326
327 static PyObject *dm_nonnormal(dirstateItemObject *self)
328 {
329 if (self->state != 'n' || self->mtime == ambiguous_time) {
330 Py_RETURN_TRUE;
331 } else {
332 Py_RETURN_FALSE;
333 }
334 };
335 static PyObject *dm_otherparent(dirstateItemObject *self)
336 {
337 if (self->size == dirstate_v1_from_p2) {
338 Py_RETURN_TRUE;
339 } else {
340 Py_RETURN_FALSE;
341 }
342 };
343
348 344 static PyGetSetDef dirstate_item_getset[] = {
349 345 {"mode", (getter)dirstate_item_get_mode, NULL, "mode", NULL},
350 346 {"size", (getter)dirstate_item_get_size, NULL, "size", NULL},
@@ -359,6 +355,8 b' static PyGetSetDef dirstate_item_getset['
359 355 "from_p2_removed", NULL},
360 356 {"from_p2", (getter)dirstate_item_get_from_p2, NULL, "from_p2", NULL},
361 357 {"removed", (getter)dirstate_item_get_removed, NULL, "removed", NULL},
358 {"dm_nonnormal", (getter)dm_nonnormal, NULL, "dm_nonnormal", NULL},
359 {"dm_otherparent", (getter)dm_otherparent, NULL, "dm_otherparent", NULL},
362 360 {NULL} /* Sentinel */
363 361 };
364 362
General Comments 0
You need to be logged in to leave comments. Login now