diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-06-07 11:13:03 +0200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-06-24 17:24:27 +0000 |
commit | d9d9463fd3c7eda14a3170e214d6a56c9efbbcec (patch) | |
tree | dbd801d1460282516e3188612fd68bba8037ba45 /lib | |
parent | 75d87b29f11a1dacb37ccc1b10f8d034063ef5ba (diff) | |
download | samba-d9d9463fd3c7eda14a3170e214d6a56c9efbbcec.tar.gz |
py3: Remove PyStr_FromFormatV() compatability macro
We no longer need Samba to be py2/py3 compatible so we choose to return to the standard
function names.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/pyldb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 456be0b79f6..148faf5bc32 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -85,7 +85,6 @@ static struct ldb_message_element *PyObject_AsMessageElement( static PyTypeObject PyLdbBytesType; #if PY_MAJOR_VERSION >= 3 -#define PyStr_FromFormatV PyUnicode_FromFormatV #define PyStr_AsUTF8 PyUnicode_AsUTF8 #define PyStr_AsUTF8AndSize PyUnicode_AsUTF8AndSize #define PyInt_FromLong PyLong_FromLong @@ -102,7 +101,6 @@ static PyObject *PyLdbBytes_FromStringAndSize(const char *msg, int size) return result; } #else -#define PyStr_FromFormatV PyString_FromFormatV #define PyStr_AsUTF8 PyString_AsString #define PyLdbBytes_FromStringAndSize PyString_FromStringAndSize @@ -988,7 +986,7 @@ static void py_ldb_debug(void *context, enum ldb_debug_level level, const char * static void py_ldb_debug(void *context, enum ldb_debug_level level, const char *fmt, va_list ap) { PyObject *fn = (PyObject *)context; - PyObject_CallFunction(fn, discard_const_p(char, "(i,O)"), level, PyStr_FromFormatV(fmt, ap)); + PyObject_CallFunction(fn, discard_const_p(char, "(i,O)"), level, PyUnicode_FromFormatV(fmt, ap)); } static PyObject *py_ldb_debug_func; |