##// END OF EJS Templates
revlog: rename indexType to HgRevlogIndex_Type as it's a global symbol...
Yuya Nishihara -
r40895:18a8def6 default
parent child Browse files
Show More
@@ -1516,7 +1516,8 b' static int ntobj_init(nodetreeObject *se'
1516 1516 {
1517 1517 PyObject *index;
1518 1518 unsigned capacity;
1519 if (!PyArg_ParseTuple(args, "O!I", &indexType, &index, &capacity))
1519 if (!PyArg_ParseTuple(args, "O!I", &HgRevlogIndex_Type, &index,
1520 &capacity))
1520 1521 return -1;
1521 1522 Py_INCREF(index);
1522 1523 return nt_init(&self->nt, (indexObject *)index, capacity);
@@ -2581,7 +2582,7 b' static PyGetSetDef index_getset[] = {'
2581 2582 {NULL} /* Sentinel */
2582 2583 };
2583 2584
2584 PyTypeObject indexType = {
2585 PyTypeObject HgRevlogIndex_Type = {
2585 2586 PyVarObject_HEAD_INIT(NULL, 0) /* header */
2586 2587 "parsers.index", /* tp_name */
2587 2588 sizeof(indexObject), /* tp_basicsize */
@@ -2637,7 +2638,7 b' PyObject *parse_index2(PyObject *self, P'
2637 2638 indexObject *idx;
2638 2639 int ret;
2639 2640
2640 idx = PyObject_New(indexObject, &indexType);
2641 idx = PyObject_New(indexObject, &HgRevlogIndex_Type);
2641 2642 if (idx == NULL)
2642 2643 goto bail;
2643 2644
@@ -2714,9 +2715,9 b' static int rustla_init(rustlazyancestors'
2714 2715 Py_ssize_t i;
2715 2716
2716 2717 indexObject *index;
2717 if (!PyArg_ParseTuple(args, "O!O!lO!", &indexType, &index, &PyList_Type,
2718 &initrevsarg, &stoprev, &PyBool_Type,
2719 &inclusivearg))
2718 if (!PyArg_ParseTuple(args, "O!O!lO!", &HgRevlogIndex_Type, &index,
2719 &PyList_Type, &initrevsarg, &stoprev,
2720 &PyBool_Type, &inclusivearg))
2720 2721 return -1;
2721 2722
2722 2723 Py_INCREF(index);
@@ -2843,11 +2844,11 b' static PyTypeObject rustlazyancestorsTyp'
2843 2844
2844 2845 void revlog_module_init(PyObject *mod)
2845 2846 {
2846 indexType.tp_new = PyType_GenericNew;
2847 if (PyType_Ready(&indexType) < 0)
2847 HgRevlogIndex_Type.tp_new = PyType_GenericNew;
2848 if (PyType_Ready(&HgRevlogIndex_Type) < 0)
2848 2849 return;
2849 Py_INCREF(&indexType);
2850 PyModule_AddObject(mod, "index", (PyObject *)&indexType);
2850 Py_INCREF(&HgRevlogIndex_Type);
2851 PyModule_AddObject(mod, "index", (PyObject *)&HgRevlogIndex_Type);
2851 2852
2852 2853 nodetreeType.tp_new = PyType_GenericNew;
2853 2854 if (PyType_Ready(&nodetreeType) < 0)
@@ -10,6 +10,6 b''
10 10
11 11 #include <Python.h>
12 12
13 extern PyTypeObject indexType;
13 extern PyTypeObject HgRevlogIndex_Type;
14 14
15 15 #endif /* _HG_REVLOG_H_ */
General Comments 0
You need to be logged in to leave comments. Login now