Show More
@@ -1483,41 +1483,34 b' static int index_find_node(indexObject *' | |||
|
1483 | 1483 | return -2; |
|
1484 | 1484 | } |
|
1485 | 1485 | |
|
1486 |
static |
|
|
1486 | static void raise_revlog_error(void) | |
|
1487 | 1487 | { |
|
1488 | static PyObject *errclass; | |
|
1489 | PyObject *mod = NULL, *errobj; | |
|
1490 | ||
|
1491 | if (errclass == NULL) { | |
|
1492 | PyObject *dict; | |
|
1488 | PyObject *mod = NULL, *dict = NULL, *errclass = NULL; | |
|
1493 | 1489 | |
|
1494 | 1490 |
|
|
1495 |
|
|
|
1496 |
|
|
|
1491 | if (mod == NULL) { | |
|
1492 | goto cleanup; | |
|
1493 | } | |
|
1497 | 1494 | |
|
1498 | 1495 |
|
|
1499 |
|
|
|
1500 |
|
|
|
1496 | if (dict == NULL) { | |
|
1497 | goto cleanup; | |
|
1498 | } | |
|
1499 | Py_INCREF(dict); | |
|
1501 | 1500 | |
|
1502 | 1501 |
|
|
1503 | 1502 |
|
|
1504 | 1503 |
|
|
1505 | 1504 |
|
|
1506 |
|
|
|
1507 | } | |
|
1508 | Py_INCREF(errclass); | |
|
1509 | Py_DECREF(mod); | |
|
1505 | goto cleanup; | |
|
1510 | 1506 | } |
|
1511 | 1507 | |
|
1512 | errobj = PyObject_CallFunction(errclass, NULL); | |
|
1513 | if (errobj == NULL) | |
|
1514 | return NULL; | |
|
1515 | PyErr_SetObject(errclass, errobj); | |
|
1516 | return errobj; | |
|
1508 | /* value of exception is ignored by callers */ | |
|
1509 | PyErr_SetString(errclass, "RevlogError"); | |
|
1517 | 1510 | |
|
1518 | classfail: | |
|
1511 | cleanup: | |
|
1512 | Py_XDECREF(dict); | |
|
1519 | 1513 | Py_XDECREF(mod); |
|
1520 | return NULL; | |
|
1521 | 1514 | } |
|
1522 | 1515 | |
|
1523 | 1516 | static PyObject *index_getitem(indexObject *self, PyObject *value) |
General Comments 0
You need to be logged in to leave comments.
Login now