Show More
@@ -1516,7 +1516,8 b' static int ntobj_init(nodetreeObject *se' | |||||
1516 | { |
|
1516 | { | |
1517 | PyObject *index; |
|
1517 | PyObject *index; | |
1518 | unsigned capacity; |
|
1518 | unsigned capacity; | |
1519 |
if (!PyArg_ParseTuple(args, "O!I", & |
|
1519 | if (!PyArg_ParseTuple(args, "O!I", &HgRevlogIndex_Type, &index, | |
|
1520 | &capacity)) | |||
1520 | return -1; |
|
1521 | return -1; | |
1521 | Py_INCREF(index); |
|
1522 | Py_INCREF(index); | |
1522 | return nt_init(&self->nt, (indexObject *)index, capacity); |
|
1523 | return nt_init(&self->nt, (indexObject *)index, capacity); | |
@@ -2581,7 +2582,7 b' static PyGetSetDef index_getset[] = {' | |||||
2581 | {NULL} /* Sentinel */ |
|
2582 | {NULL} /* Sentinel */ | |
2582 | }; |
|
2583 | }; | |
2583 |
|
2584 | |||
2584 |
PyTypeObject |
|
2585 | PyTypeObject HgRevlogIndex_Type = { | |
2585 | PyVarObject_HEAD_INIT(NULL, 0) /* header */ |
|
2586 | PyVarObject_HEAD_INIT(NULL, 0) /* header */ | |
2586 | "parsers.index", /* tp_name */ |
|
2587 | "parsers.index", /* tp_name */ | |
2587 | sizeof(indexObject), /* tp_basicsize */ |
|
2588 | sizeof(indexObject), /* tp_basicsize */ | |
@@ -2637,7 +2638,7 b' PyObject *parse_index2(PyObject *self, P' | |||||
2637 | indexObject *idx; |
|
2638 | indexObject *idx; | |
2638 | int ret; |
|
2639 | int ret; | |
2639 |
|
2640 | |||
2640 |
idx = PyObject_New(indexObject, & |
|
2641 | idx = PyObject_New(indexObject, &HgRevlogIndex_Type); | |
2641 | if (idx == NULL) |
|
2642 | if (idx == NULL) | |
2642 | goto bail; |
|
2643 | goto bail; | |
2643 |
|
2644 | |||
@@ -2714,9 +2715,9 b' static int rustla_init(rustlazyancestors' | |||||
2714 | Py_ssize_t i; |
|
2715 | Py_ssize_t i; | |
2715 |
|
2716 | |||
2716 | indexObject *index; |
|
2717 | indexObject *index; | |
2717 |
if (!PyArg_ParseTuple(args, "O!O!lO!", & |
|
2718 | if (!PyArg_ParseTuple(args, "O!O!lO!", &HgRevlogIndex_Type, &index, | |
2718 |
&initrevsarg, &stoprev, |
|
2719 | &PyList_Type, &initrevsarg, &stoprev, | |
2719 | &inclusivearg)) |
|
2720 | &PyBool_Type, &inclusivearg)) | |
2720 | return -1; |
|
2721 | return -1; | |
2721 |
|
2722 | |||
2722 | Py_INCREF(index); |
|
2723 | Py_INCREF(index); | |
@@ -2843,11 +2844,11 b' static PyTypeObject rustlazyancestorsTyp' | |||||
2843 |
|
2844 | |||
2844 | void revlog_module_init(PyObject *mod) |
|
2845 | void revlog_module_init(PyObject *mod) | |
2845 | { |
|
2846 | { | |
2846 |
|
|
2847 | HgRevlogIndex_Type.tp_new = PyType_GenericNew; | |
2847 |
if (PyType_Ready(& |
|
2848 | if (PyType_Ready(&HgRevlogIndex_Type) < 0) | |
2848 | return; |
|
2849 | return; | |
2849 |
Py_INCREF(& |
|
2850 | Py_INCREF(&HgRevlogIndex_Type); | |
2850 |
PyModule_AddObject(mod, "index", (PyObject *)& |
|
2851 | PyModule_AddObject(mod, "index", (PyObject *)&HgRevlogIndex_Type); | |
2851 |
|
2852 | |||
2852 | nodetreeType.tp_new = PyType_GenericNew; |
|
2853 | nodetreeType.tp_new = PyType_GenericNew; | |
2853 | if (PyType_Ready(&nodetreeType) < 0) |
|
2854 | if (PyType_Ready(&nodetreeType) < 0) |
General Comments 0
You need to be logged in to leave comments.
Login now