summaryrefslogtreecommitdiff
path: root/python/modules.c
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2017-04-20 15:11:58 +0200
committerStefan Metzmacher <metze@samba.org>2017-06-13 22:46:14 +0200
commitba4cabb74f9abf834ee50364fba98ba8c3e9dee3 (patch)
tree8bc9b1c86ad7422008ac77a42927bbc0ac8a2a33 /python/modules.c
parentaa74d6edf597c92112553b74d9e3675dfa30ca48 (diff)
downloadsamba-ba4cabb74f9abf834ee50364fba98ba8c3e9dee3.tar.gz
python: Port simple libpython module to Python 3 compatible form
Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'python/modules.c')
-rw-r--r--python/modules.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/modules.c b/python/modules.c
index 371f0d5a07a..5db3dd348e2 100644
--- a/python/modules.c
+++ b/python/modules.c
@@ -18,13 +18,14 @@
*/
#include <Python.h>
+#include "py3compat.h"
#include "includes.h"
#include "python/modules.h"
#include "dynconfig/dynconfig.h"
static bool PySys_PathPrepend(PyObject *list, const char *path)
{
- PyObject *py_path = PyString_FromString(path);
+ PyObject *py_path = PyStr_FromString(path);
if (py_path == NULL)
return false;