Author: Matti Picus <[email protected]>
Branch:
Changeset: r70300:bef3dc99bdd7
Date: 2014-03-26 23:01 +0200
http://bitbucket.org/pypy/pypy/changeset/bef3dc99bdd7/
Log: correct types via casting
diff --git a/pypy/module/cpyext/test/test_intobject.py
b/pypy/module/cpyext/test/test_intobject.py
--- a/pypy/module/cpyext/test/test_intobject.py
+++ b/pypy/module/cpyext/test/test_intobject.py
@@ -107,10 +107,10 @@
} EnumObject;
static void
- enum_dealloc(EnumObject *op)
+ enum_dealloc(PyObject *op)
{
- Py_DECREF(op->ob_name);
- Py_TYPE(op)->tp_free((PyObject *)op);
+ Py_DECREF(((EnumObject *)op)->ob_name);
+ Py_TYPE(op)->tp_free(op);
}
static PyMemberDef enum_members[] = {
diff --git a/pypy/module/cpyext/test/test_pyerrors.py
b/pypy/module/cpyext/test/test_pyerrors.py
--- a/pypy/module/cpyext/test/test_pyerrors.py
+++ b/pypy/module/cpyext/test/test_pyerrors.py
@@ -158,14 +158,14 @@
PyErr_NormalizeException(&type, &val, &tb);
if (type != PyExc_TypeError)
Py_RETURN_FALSE;
- if (val->ob_type != PyExc_TypeError)
+ if (val->ob_type != (_typeobject *)PyExc_TypeError)
Py_RETURN_FALSE;
/* Normalize again */
PyErr_NormalizeException(&type, &val, &tb);
if (type != PyExc_TypeError)
Py_RETURN_FALSE;
- if (val->ob_type != PyExc_TypeError)
+ if (val->ob_type != (_typeobject *)PyExc_TypeError)
Py_RETURN_FALSE;
PyErr_Restore(type, val, tb);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit