Skip to content

Commit df7019a

Browse files
committed
Sync mypy and bump to 0.4.0
1 parent 13d01ac commit df7019a

File tree

8 files changed

+648
-117
lines changed

8 files changed

+648
-117
lines changed

lib-rt/exc_ops.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "pythoncapi_compat.h"
2+
13
// Exception related primitive operations
24
//
35
// These are registered in mypyc.primitives.exc_ops.
@@ -24,7 +26,7 @@ void CPy_Reraise(void) {
2426
}
2527

2628
void CPyErr_SetObjectAndTraceback(PyObject *type, PyObject *value, PyObject *traceback) {
27-
if (!PyType_Check(type) && value == Py_None) {
29+
if (!PyType_Check(type) && Py_IsNone(value)) {
2830
// The first argument must be an exception instance
2931
value = type;
3032
type = (PyObject *)Py_TYPE(value);

0 commit comments

Comments
 (0)