Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r89635:37645aa1733f
Date: 2017-01-17 17:57 +0100
http://bitbucket.org/pypy/pypy/changeset/37645aa1733f/

Log:    fix reference leak

diff --git a/pypy/module/cpyext/test/foo3.c b/pypy/module/cpyext/test/foo3.c
--- a/pypy/module/cpyext/test/foo3.c
+++ b/pypy/module/cpyext/test/foo3.c
@@ -137,7 +137,7 @@
     PyObject *mod, *d;
     PyObject *module = NULL;
     module = PyImport_ImportModule("datetime");
-    typ = PyObject_GetAttr(module, PyString_FromString("datetime"));
+    typ = PyObject_GetAttrString(module, "datetime");
     Py_DECREF(module);
     if (!PyType_Check(typ)) {
         PyErr_Format(PyExc_TypeError, "datetime.datetime is not a type 
object");
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to