From: Georg Brandl Date: Tue, 6 Nov 2007 17:58:02 +0000 (+0100) Subject: Silence some warnings. X-Git-Tag: 2.0rc1~247 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df2e34d1d9c70624a71305a47e999db61e117251;p=jinja2.git Silence some warnings. --HG-- branch : trunk --- diff --git a/jinja/_speedups.c b/jinja/_speedups.c index f205300..70f0bf1 100644 --- a/jinja/_speedups.c +++ b/jinja/_speedups.c @@ -398,7 +398,7 @@ static PyMethodDef BaseContext_methods[] = { {NULL} /* Sentinel */ }; -static PySequenceMethods BaseContext_as_sequence[] = { +static PySequenceMethods BaseContext_as_sequence = { 0, /* sq_length */ 0, /* sq_concat */ 0, /* sq_repeat */ @@ -411,7 +411,7 @@ static PySequenceMethods BaseContext_as_sequence[] = { 0 /* sq_inplace_repeat */ }; -static PyMappingMethods BaseContext_as_mapping[] = { +static PyMappingMethods BaseContext_as_mapping = { NULL, (binaryfunc)BaseContext_getitem, (objobjargproc)BaseContext_setitem @@ -430,8 +430,8 @@ static PyTypeObject BaseContextType = { 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ - BaseContext_as_sequence, /* tp_as_sequence */ - BaseContext_as_mapping, /* tp_as_mapping */ + &BaseContext_as_sequence, /* tp_as_sequence */ + &BaseContext_as_mapping, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ @@ -440,7 +440,7 @@ static PyTypeObject BaseContextType = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "", /* tp_doc */ - BaseContext_traverse, /* tp_traverse */ + (traverseproc)BaseContext_traverse, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */