From 7cdef1fa49736b1036bcde2d5348d374846a21c0 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 19 Jun 2020 21:02:25 +0200 Subject: [PATCH 1/6] python: remove unused PyString_Size (#44287) --- bindings/python/wrapper_top.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c index 2bdf1c85..e6ba00f1 100644 --- a/bindings/python/wrapper_top.c +++ b/bindings/python/wrapper_top.c @@ -28,14 +28,6 @@ typedef int Py_ssize_t; #define PyString_FromFormat PyUnicode_FromFormat #define PyString_FromString PyUnicode_FromString #define PyString_AsString PyUnicode_AsUTF8 -static Py_ssize_t PyString_Size(PyObject *string) { - Py_ssize_t size; - char *ret = PyUnicode_AsUTF8AndSize(string, &size); - if (! ret) { - return -1; - } - return size; -} #define get_pystring PyUnicode_AsUTF8AndSize #define PyStringFree(string) ; #elif PY_MAJOR_VERSION >= 3 -- 2.26.2