diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-03-11 17:01:53 +0100 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2015-03-11 17:32:32 +0100 |
commit | 34ad28d225771541e3a294bf3782be0839575148 (patch) | |
tree | 94c374ab3fb50ca6ca91c3ab4bd95a3ba7f1599a /lib/ldb/pyldb_util.c | |
parent | d479cbfe08b143f65c674a005f2acc9257a30a47 (diff) | |
download | samba-py3compat-34ad28d.tar.gz samba-py3compat-34ad28d.tar.xz samba-py3compat-34ad28d.zip |
[TMP] Port ldb to Python 3py3compat-34ad28d
Diffstat (limited to 'lib/ldb/pyldb_util.c')
-rw-r--r-- | lib/ldb/pyldb_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ldb/pyldb_util.c b/lib/ldb/pyldb_util.c index 4be9126405..70757a4b3d 100644 --- a/lib/ldb/pyldb_util.c +++ b/lib/ldb/pyldb_util.c @@ -24,6 +24,7 @@ */ #include <Python.h> +#include "py3compat.h" #include "ldb.h" #include "pyldb.h" @@ -69,8 +70,8 @@ bool pyldb_Object_AsDn(TALLOC_CTX *mem_ctx, PyObject *object, struct ldb_dn *odn; PyTypeObject *PyLdb_Dn_Type; - if (ldb_ctx != NULL && PyString_Check(object)) { - odn = ldb_dn_new(mem_ctx, ldb_ctx, PyString_AsString(object)); + if (ldb_ctx != NULL && PyStr_Check(object)) { + odn = ldb_dn_new(mem_ctx, ldb_ctx, PyStr_AsString(object)); *dn = odn; return true; } |