equal
deleted
inserted
replaced
153 static PyObject *dirstatetuple_get_state(dirstateTupleObject *self) |
153 static PyObject *dirstatetuple_get_state(dirstateTupleObject *self) |
154 { |
154 { |
155 return PyBytes_FromStringAndSize(&self->state, 1); |
155 return PyBytes_FromStringAndSize(&self->state, 1); |
156 }; |
156 }; |
157 |
157 |
|
158 static PyObject *dirstatetuple_get_merged(dirstateTupleObject *self) |
|
159 { |
|
160 if (self->state == 'm') { |
|
161 Py_RETURN_TRUE; |
|
162 } else { |
|
163 Py_RETURN_FALSE; |
|
164 } |
|
165 }; |
|
166 |
158 static PyGetSetDef dirstatetuple_getset[] = { |
167 static PyGetSetDef dirstatetuple_getset[] = { |
159 {"state", (getter)dirstatetuple_get_state, NULL, "state", NULL}, |
168 {"state", (getter)dirstatetuple_get_state, NULL, "state", NULL}, |
|
169 {"merged", (getter)dirstatetuple_get_merged, NULL, "merged", NULL}, |
160 {NULL} /* Sentinel */ |
170 {NULL} /* Sentinel */ |
161 }; |
171 }; |
162 |
172 |
163 PyTypeObject dirstateTupleType = { |
173 PyTypeObject dirstateTupleType = { |
164 PyVarObject_HEAD_INIT(NULL, 0) /* header */ |
174 PyVarObject_HEAD_INIT(NULL, 0) /* header */ |