From 1be36946c17ae058e7d4d7b5cd2adccffad45b1c Mon Sep 17 00:00:00 2001 From: cgohlke Date: Tue, 24 Jun 2014 19:06:05 -0700 Subject: [PATCH] Fix segfault when importing _imagingmorph --- _imagingmorph.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_imagingmorph.c b/_imagingmorph.c index 7e7fdd879..1dee7eb64 100644 --- a/_imagingmorph.c +++ b/_imagingmorph.c @@ -267,9 +267,10 @@ setup_module(PyObject* m) static PyMethodDef functions[] = { /* Functions */ - {"apply", (PyCFunction)apply, 1}, - {"get_on_pixels", (PyCFunction)get_on_pixels, 1}, - {"match", (PyCFunction)match, 1}, + {"apply", (PyCFunction)apply, METH_VARARGS, NULL}, + {"get_on_pixels", (PyCFunction)get_on_pixels, METH_VARARGS, NULL}, + {"match", (PyCFunction)match, METH_VARARGS, NULL}, + {NULL, NULL, 0, NULL} }; #if PY_VERSION_HEX >= 0x03000000