summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Abbatiello <abbeyj@gmail.com>2009-06-28 12:54:53 -0400
committerJames Abbatiello <abbeyj@gmail.com>2009-06-28 12:54:53 -0400
commit7a2bf655e1e0f42c6571293ec7968dfd2daafd5d (patch)
tree20ff377e9f0a41c97961dc80e8d40b039b8f8f35
parent168e65b497ceea597584b3256a11a37118bf9fa0 (diff)
downloadpython-cheetah-7a2bf655e1e0f42c6571293ec7968dfd2daafd5d.tar.gz
Fix warnings when compiling _template.c on MSVC
-rw-r--r--src/c/_template.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c/_template.c b/src/c/_template.c
index 04fced1..2345336 100644
--- a/src/c/_template.c
+++ b/src/c/_template.c
@@ -14,7 +14,7 @@ static PyObject *unspecified = NULL;
static PyObject *py_valordefault(PyObject *self, PyObject *args, PyObject *kwargs)
{
- PyObject *value, *def, *res;
+ PyObject *value, *def;
if (!PyArg_ParseTuple(args, "OO", &value, &def))
return NULL;
@@ -31,7 +31,7 @@ static const char _template_doc[] = "\
\n\
";
static struct PyMethodDef _template_methods[] = {
- {"valOrDefault", py_valordefault, METH_VARARGS, NULL},
+ {"valOrDefault", (PyCFunction)py_valordefault, METH_VARARGS, NULL},
{NULL}
};
@@ -41,10 +41,10 @@ PyMODINIT_FUNC init_template()
_template_doc);
unspecifiedModule = PyImport_ImportModule("Cheetah.Unspecified");
if ( (PyErr_Occurred()) || (!unspecifiedModule) )
- return NULL;
+ return;
unspecified = PyObject_GetAttrString(unspecifiedModule, "Unspecified");
if (PyErr_Occurred())
- return NULL;
+ return;
}
#ifdef __cplusplus