summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-08-22 19:47:25 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-08-22 19:47:25 (GMT)
commit7d4c3177d541bb65d2d98aae165b0be9186e74f6 (patch)
tree6a8ce66e0e00b271bc38b39aebcd6dec5ec13094 /Objects
parentfb1813cb8d44e7069444f957d21bd460ddc234ab (diff)
downloadcpython-7d4c3177d541bb65d2d98aae165b0be9186e74f6.zip
cpython-7d4c3177d541bb65d2d98aae165b0be9186e74f6.tar.gz
cpython-7d4c3177d541bb65d2d98aae165b0be9186e74f6.tar.bz2
Silenced compiler warning
Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used Reviewed by Benjamin Peterson
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c1
-rw-r--r--Objects/stringlib/find.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 5ba1f6d..c4fc37f 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1098,6 +1098,7 @@ bytes_dealloc(PyByteArrayObject *self)
#define STRINGLIB_EMPTY nullbytes
#define STRINGLIB_CHECK_EXACT PyByteArray_CheckExact
#define STRINGLIB_MUTABLE 1
+#define FROM_BYTEARRAY 1
#include "stringlib/fastsearch.h"
#include "stringlib/count.h"
diff --git a/Objects/stringlib/find.h b/Objects/stringlib/find.h
index 5b17c7f..9e0d299 100644
--- a/Objects/stringlib/find.h
+++ b/Objects/stringlib/find.h
@@ -90,7 +90,7 @@ stringlib_rfind_slice(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
return stringlib_rfind(str + start, end - start, sub, sub_len, start);
}
-#ifdef STRINGLIB_STR
+#if defined(STRINGLIB_STR) && !defined(FROM_BYTEARRAY)
Py_LOCAL_INLINE(int)
stringlib_contains_obj(PyObject* str, PyObject* sub)