From: Avery Pennarun Date: Fri, 11 Mar 2011 03:58:58 +0000 (-0800) Subject: _helpers.c: fix a "type punning" warning from gcc. X-Git-Tag: bup-0.24b~1 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=2672a5e209f2d99e9540a1df4f148528e8bb3c91 _helpers.c: fix a "type punning" warning from gcc. _helpers.c: In function ‘bloom_contains’: _helpers.c:260: warning: dereferencing type-punned pointer will break strict-aliasing rules Whatever, let's use 1 instead of the apparently problematic Py_True. Signed-off-by: Avery Pennarun --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index af9d06f..433c43a 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -257,7 +257,7 @@ static PyObject *bloom_contains(PyObject *self, PyObject *args) else return NULL; - return Py_BuildValue("Oi", Py_True, k); + return Py_BuildValue("ii", 1, k); }