Mercurial > cpython-lru_cache-weakref
comparison Python/errors.c @ 76391:cb6811eb20ef
Fix it for good :-)
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Wed, 18 Apr 2012 16:57:54 +0200 |
| parents | e8c87226bcb3 |
| children | 9fdec1354af4 |
comparison
equal
deleted
inserted
replaced
| 76389:e8c87226bcb3 | 76391:cb6811eb20ef |
|---|---|
| 591 PyObject *args, *kwargs, *error; | 591 PyObject *args, *kwargs, *error; |
| 592 | 592 |
| 593 if (msg == NULL) | 593 if (msg == NULL) |
| 594 return NULL; | 594 return NULL; |
| 595 | 595 |
| 596 args = PyTuple_New(0); | 596 args = PyTuple_New(1); |
| 597 if (args == NULL) | 597 if (args == NULL) |
| 598 return NULL; | 598 return NULL; |
| 599 | 599 |
| 600 kwargs = PyDict_New(); | 600 kwargs = PyDict_New(); |
| 601 if (kwargs == NULL) { | 601 if (kwargs == NULL) { |
| 602 Py_DECREF(args); | 602 Py_DECREF(args); |
| 603 return NULL; | 603 return NULL; |
| 604 } | 604 } |
| 605 | 605 |
| 606 if (name == NULL) { | 606 if (name == NULL) { |
| 607 Py_INCREF(Py_None); | |
| 608 name = Py_None; | 607 name = Py_None; |
| 609 } | 608 } |
| 610 | 609 |
| 611 if (path == NULL) { | 610 if (path == NULL) { |
| 612 Py_INCREF(Py_None); | |
| 613 path = Py_None; | 611 path = Py_None; |
| 614 } | 612 } |
| 615 | 613 |
| 616 Py_INCREF(msg); | 614 Py_INCREF(msg); |
| 617 PyTuple_SET_ITEM(args, 0, msg); | 615 PyTuple_SET_ITEM(args, 0, msg); |
