equal
deleted
inserted
replaced
15 #include <stdlib.h> |
15 #include <stdlib.h> |
16 #include <string.h> |
16 #include <string.h> |
17 |
17 |
18 #include "bitmanipulation.h" |
18 #include "bitmanipulation.h" |
19 #include "charencode.h" |
19 #include "charencode.h" |
|
20 #include "revlog.h" |
20 #include "util.h" |
21 #include "util.h" |
21 |
22 |
22 #ifdef IS_PY3K |
23 #ifdef IS_PY3K |
23 /* The mapping of Python types is meant to be temporary to get Python |
24 /* The mapping of Python types is meant to be temporary to get Python |
24 * 3 to compile. We should remove this once Python 3 support is fully |
25 * 3 to compile. We should remove this once Python 3 support is fully |
1508 return -1; |
1509 return -1; |
1509 } |
1510 } |
1510 self->length = 1; |
1511 self->length = 1; |
1511 return 0; |
1512 return 0; |
1512 } |
1513 } |
1513 |
|
1514 static PyTypeObject indexType; |
|
1515 |
1514 |
1516 static int ntobj_init(nodetreeObject *self, PyObject *args) |
1515 static int ntobj_init(nodetreeObject *self, PyObject *args) |
1517 { |
1516 { |
1518 PyObject *index; |
1517 PyObject *index; |
1519 unsigned capacity; |
1518 unsigned capacity; |
2580 static PyGetSetDef index_getset[] = { |
2579 static PyGetSetDef index_getset[] = { |
2581 {"nodemap", (getter)index_nodemap, NULL, "nodemap", NULL}, |
2580 {"nodemap", (getter)index_nodemap, NULL, "nodemap", NULL}, |
2582 {NULL} /* Sentinel */ |
2581 {NULL} /* Sentinel */ |
2583 }; |
2582 }; |
2584 |
2583 |
2585 static PyTypeObject indexType = { |
2584 PyTypeObject indexType = { |
2586 PyVarObject_HEAD_INIT(NULL, 0) /* header */ |
2585 PyVarObject_HEAD_INIT(NULL, 0) /* header */ |
2587 "parsers.index", /* tp_name */ |
2586 "parsers.index", /* tp_name */ |
2588 sizeof(indexObject), /* tp_basicsize */ |
2587 sizeof(indexObject), /* tp_basicsize */ |
2589 0, /* tp_itemsize */ |
2588 0, /* tp_itemsize */ |
2590 (destructor)index_dealloc, /* tp_dealloc */ |
2589 (destructor)index_dealloc, /* tp_dealloc */ |