diff options
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; } |