[pypy-svn] r74950 - in pypy/trunk/pypy/module/cpyext: include test

afa at codespeak.net afa at codespeak.net
Mon May 31 01:41:04 CEST 2010


Author: afa
Date: Mon May 31 01:41:02 2010
New Revision: 74950

Modified:
   pypy/trunk/pypy/module/cpyext/include/stringobject.h
   pypy/trunk/pypy/module/cpyext/test/test_cell.py
   pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
Log:
kill warnings in cpyext tests


Modified: pypy/trunk/pypy/module/cpyext/include/stringobject.h
==============================================================================
--- pypy/trunk/pypy/module/cpyext/include/stringobject.h	(original)
+++ pypy/trunk/pypy/module/cpyext/include/stringobject.h	Mon May 31 01:41:02 2010
@@ -18,7 +18,7 @@
     Py_ssize_t size;
 } PyStringObject;
 
-PyObject *PyString_FromFormatV(char *format, va_list vargs);
+PyObject *PyString_FromFormatV(const char *format, va_list vargs);
 PyObject *PyString_FromFormat(const char *format, ...);
 
 #ifdef __cplusplus

Modified: pypy/trunk/pypy/module/cpyext/test/test_cell.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_cell.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_cell.py	Mon May 31 01:41:02 2010
@@ -6,7 +6,7 @@
         module = self.import_extension('foo', [
             ("cell_type", "METH_O",
              """
-                 PyDict_SetItemString(args, "cell", &PyCell_Type);
+                 PyDict_SetItemString(args, "cell", (PyObject*)&PyCell_Type);
                  Py_RETURN_NONE;
              """)])
         d = {}

Modified: pypy/trunk/pypy/module/cpyext/test/test_cpyext.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_cpyext.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_cpyext.py	Mon May 31 01:41:02 2010
@@ -582,8 +582,8 @@
             Py_InitModule("foo", methods);
         """
         body = """
-        PyObject* PyPy_Crash1(void);
-        long PyPy_Crash2(void);
+        PyAPI_FUNC(PyObject*) PyPy_Crash1(void);
+        PyAPI_FUNC(long) PyPy_Crash2(void);
         static PyObject* foo_crash1(PyObject* self, PyObject *args)
         {
             return PyPy_Crash1();



More information about the Pypy-commit mailing list