--- /dev/null
+#include <Python.h>
+
+static PyObject* py_test(PyObject* self, PyObject* args)
+{
+ unsigned char *image;
+ int x;
+ int y;
+ int size;
+
+ if (!PyArg_ParseTuple(args, "(ii)s#", &x, &y, &image, &size)) return NULL;
+
+ int i;
+ for (i=0; i < size; i++) {
+ image[i] = i % 256;
+ }
+
+ return Py_BuildValue("s#", image, size);
+}
+static PyMethodDef myModule_methods[] = {
+ {"test", py_test, METH_VARARGS},
+ {NULL, NULL}
+};
+
+void initpcf()
+{
+ (void) Py_InitModule("pcf", myModule_methods);
+}