mercurial/cext/parsers.c
changeset 47536 8e4b9fe31334
parent 47532 ccbabaee5c36
child 47537 0e5800c88eb4
equal deleted inserted replaced
47535:6025353c9c55 47536:8e4b9fe31334
   167     {"need_delay", (PyCFunction)dirstatetuple_need_delay, METH_O,
   167     {"need_delay", (PyCFunction)dirstatetuple_need_delay, METH_O,
   168      "True if the stored mtime would be ambiguous with the current time"},
   168      "True if the stored mtime would be ambiguous with the current time"},
   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);
   175 };
   180 };
   176 
   181 
   236 		Py_RETURN_FALSE;
   241 		Py_RETURN_FALSE;
   237 	}
   242 	}
   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},
   244     {"merged_removed", (getter)dirstatetuple_get_merged_removed, NULL,
   250     {"merged_removed", (getter)dirstatetuple_get_merged_removed, NULL,
   245      "merged_removed", NULL},
   251      "merged_removed", NULL},