diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-06-07 10:45:52 +0200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-06-24 17:24:27 +0000 |
commit | 34f9a089d8d3a8971b2f7ee45f6d8e823a52a193 (patch) | |
tree | e82a39e5c36f4c9fc1ec7074f82ead6d9221315a /lib/tdb | |
parent | f498c819664e9df658651d39f616f5b4d62b4750 (diff) | |
download | samba-34f9a089d8d3a8971b2f7ee45f6d8e823a52a193.tar.gz |
py3: Remove PyStr_FromString() 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/tdb')
-rw-r--r-- | lib/tdb/pytdb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c index 87867478b57..ce671a92b9a 100644 --- a/lib/tdb/pytdb.c +++ b/lib/tdb/pytdb.c @@ -32,14 +32,12 @@ #include <tdb.h> #if PY_MAJOR_VERSION >= 3 -#define PyStr_FromString PyUnicode_FromString #define PyStr_FromFormat PyUnicode_FromFormat #define PyInt_FromLong PyLong_FromLong #define PyInt_Check PyLong_Check #define PyInt_AsLong PyLong_AsLong #define Py_TPFLAGS_HAVE_ITER 0 #else -#define PyStr_FromString PyString_FromString #define PyStr_FromFormat PyString_FromFormat #endif @@ -654,7 +652,7 @@ static PyObject *tdb_object_repr(PyTdbObject *self) { PyErr_TDB_RAISE_IF_CLOSED(self); if (tdb_get_flags(self->ctx) & TDB_INTERNAL) { - return PyStr_FromString("Tdb(<internal>)"); + return PyUnicode_FromString("Tdb(<internal>)"); } else { return PyStr_FromFormat("Tdb('%s')", tdb_name(self->ctx)); } |