summaryrefslogtreecommitdiff
path: root/PC/example_nt
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-02 19:20:26 +0000
committerGeorg Brandl <georg@python.org>2009-01-02 19:20:26 +0000
commitb87d24cb20cbdf4707a208d06e61e99d7c49b9b7 (patch)
treec3fae2e36781d2c42741255abe69a3b518ea45c3 /PC/example_nt
parentb1848a7a1a54b4a1486d7f7aecf164fc472f35ea (diff)
downloadcpython-b87d24cb20cbdf4707a208d06e61e99d7c49b9b7.tar.gz
Remove traces of Py_InitModule*.
Diffstat (limited to 'PC/example_nt')
-rw-r--r--PC/example_nt/example.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/PC/example_nt/example.c b/PC/example_nt/example.c
index 953fb824e7..d807311d96 100644
--- a/PC/example_nt/example.c
+++ b/PC/example_nt/example.c
@@ -13,8 +13,20 @@ static PyMethodDef example_methods[] = {
{NULL, NULL}
};
+static struct PyModuleDef examplemodule = {
+ PyModuleDef_HEAD_INIT,
+ "example",
+ "example module doc string",
+ -1,
+ example_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
PyMODINIT_FUNC
-initexample(void)
+PyInit_example(void)
{
- Py_InitModule("example", example_methods);
+ return PyModule_Create(&examplemodule);
}