[pypy-commit] pypy py3k-update: Fix pointer types in test module creation
rlamy
pypy.commits at gmail.com
Sat Apr 30 15:30:07 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k-update
Changeset: r84063:61f551d2e3fc
Date: 2016-04-30 20:29 +0100
http://bitbucket.org/pypy/pypy/changeset/61f551d2e3fc/
Log: Fix pointer types in test module creation
diff --git a/pypy/module/cpyext/test/banana.c b/pypy/module/cpyext/test/banana.c
--- a/pypy/module/cpyext/test/banana.c
+++ b/pypy/module/cpyext/test/banana.c
@@ -9,11 +9,11 @@
"banana",
"Module Doc",
-1,
- &banana_functions
+ banana_functions,
};
PyMODINIT_FUNC
-*PyInit_banana(void)
+PyInit_banana(void)
{
return PyModule_Create(&moduledef);
}
diff --git a/pypy/module/cpyext/test/comparisons.c b/pypy/module/cpyext/test/comparisons.c
--- a/pypy/module/cpyext/test/comparisons.c
+++ b/pypy/module/cpyext/test/comparisons.c
@@ -83,7 +83,7 @@
PyMODINIT_FUNC
-*PyInit_comparisons(void)
+PyInit_comparisons(void)
{
PyObject *m, *d;
diff --git a/pypy/module/cpyext/test/date.c b/pypy/module/cpyext/test/date.c
--- a/pypy/module/cpyext/test/date.c
+++ b/pypy/module/cpyext/test/date.c
@@ -9,11 +9,11 @@
"date",
"Module Doc",
-1,
- &date_functions
+ date_functions,
};
PyMODINIT_FUNC
-*PyInit_date(void)
+PyInit_date(void)
{
PyObject *module, *othermodule;
module = PyModule_Create(&moduledef);
diff --git a/pypy/module/cpyext/test/dotted.c b/pypy/module/cpyext/test/dotted.c
--- a/pypy/module/cpyext/test/dotted.c
+++ b/pypy/module/cpyext/test/dotted.c
@@ -9,11 +9,11 @@
"pypy.module.cpyext.test.dotted",
"Module Doc",
-1,
- &dotted_functions
+ dotted_functions
};
PyMODINIT_FUNC
-*PyInit_dotted(void)
+PyInit_dotted(void)
{
return PyModule_Create(&moduledef);
}
diff --git a/pypy/module/cpyext/test/foo.c b/pypy/module/cpyext/test/foo.c
--- a/pypy/module/cpyext/test/foo.c
+++ b/pypy/module/cpyext/test/foo.c
@@ -654,7 +654,11 @@
"foo",
"Module Doc",
-1,
- &foo_functions
+ foo_functions,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
};
/* Initialize this module. */
@@ -665,7 +669,7 @@
#endif
PyMODINIT_FUNC
-*PyInit_foo(void)
+PyInit_foo(void)
{
PyObject *m, *d;
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
@@ -67,7 +67,7 @@
"foo",
"Module Doc",
-1,
- &sbkMethods,
+ sbkMethods,
NULL,
NULL,
NULL,
diff --git a/pypy/module/cpyext/test/modinit.c b/pypy/module/cpyext/test/modinit.c
--- a/pypy/module/cpyext/test/modinit.c
+++ b/pypy/module/cpyext/test/modinit.c
@@ -14,7 +14,7 @@
"modinit",
"",
-1,
- &methods
+ methods
};
PyMODINIT_FUNC
diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -395,7 +395,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
""" % dict(methods='\n'.join(methods_table), modname=modname)
init = """PyObject *mod = PyModule_Create(&moduledef);"""
@@ -519,7 +519,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -547,7 +547,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -670,7 +670,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -701,7 +701,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -724,7 +724,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -780,7 +780,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
@@ -849,7 +849,7 @@
"%(modname)s", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
- &methods /* m_methods */
+ methods, /* m_methods */
};
"""
module = self.import_module(name='foo', body=body)
More information about the pypy-commit
mailing list