Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r3121:af3a1e8a51e0
Date: 2018-06-01 19:32 +0200
http://bitbucket.org/cffi/cffi/changeset/af3a1e8a51e0/

Log:    Py3.7: fix const-correctness

diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -4154,7 +4154,7 @@
     dl_methods,                         /* tp_methods */
 };
 
-static void *b_do_dlopen(PyObject *args, char **p_printable_filename,
+static void *b_do_dlopen(PyObject *args, const char **p_printable_filename,
                          PyObject **p_temp)
 {
     /* Logic to call the correct version of dlopen().  Returns NULL in case of 
error.
@@ -4224,7 +4224,7 @@
 
 static PyObject *b_load_library(PyObject *self, PyObject *args)
 {
-    char *printable_filename;
+    const char *printable_filename;
     PyObject *temp;
     void *handle;
     DynLibObject *dlobj = NULL;
diff --git a/c/cdlopen.c b/c/cdlopen.c
--- a/c/cdlopen.c
+++ b/c/cdlopen.c
@@ -40,7 +40,7 @@
 
 static PyObject *ffi_dlopen(PyObject *self, PyObject *args)
 {
-    char *modname;
+    const char *modname;
     PyObject *temp, *result = NULL;
     void *handle;
 
diff --git a/c/lib_obj.c b/c/lib_obj.c
--- a/c/lib_obj.c
+++ b/c/lib_obj.c
@@ -611,7 +611,7 @@
     offsetof(LibObject, l_dict),                /* tp_dictoffset */
 };
 
-static LibObject *lib_internal_new(FFIObject *ffi, char *module_name,
+static LibObject *lib_internal_new(FFIObject *ffi, const char *module_name,
                                    void *dlopen_libhandle)
 {
     LibObject *lib;
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to