]> arthur.barton.de Git - bup.git/commitdiff
_helpers.c: fix a "type punning" warning from gcc.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 11 Mar 2011 03:58:58 +0000 (19:58 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 11 Mar 2011 03:58:58 +0000 (19:58 -0800)
_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 <apenwarr@gmail.com>
lib/bup/_helpers.c

index af9d06f35273cabe4304d1142eb62d7b6e24cee8..433c43ad4ba41efd35bc976d046d2e0bc1e686e8 100644 (file)
@@ -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);
 }