[git] GPGME - branch, master, updated. gpgme-1.6.0-153-g73c4753

by Justus Winter cvs at cvs.gnupg.org
Wed Jun 1 14:19:30 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  73c47535b631a55687ecc5eff1d1d9a9fd71021e (commit)
      from  54314a9c7d7ad52981c836ca742644a1fa69b518 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 73c47535b631a55687ecc5eff1d1d9a9fd71021e
Author: Justus Winter <justus at g10code.com>
Date:   Wed Jun 1 14:16:27 2016 +0200

    python: Improve build system integration, fix warnings.
    
    * lang/python/Makefile.am: Pass CFLAGS to python build system.
    * lang/python/helpers.c (pyPassphraseCb): Use correct type for length.
    (pygpgme_data_new_from_cbs): Drop unused variable.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 8034922..18f77bb 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -40,7 +40,7 @@ gpgme_wrap.c pyme/pygpgme.py: gpgme.i errors.i gpgme.h copystamp
 	  $<
 
 all-local: gpgme_wrap.c pyme/pygpgme.py copystamp
-	$(PYTHON) $(srcdir)/setup.py build --verbose
+	CFLAGS="$(CFLAGS)" $(PYTHON) $(srcdir)/setup.py build --verbose
 
 clean-local:
 	rm -rf -- build gpgme.h errors.i gpgme_wrap.c pyme/pygpgme.py \
diff --git a/lang/python/helpers.c b/lang/python/helpers.c
index 4792c87..4bbc298 100644
--- a/lang/python/helpers.c
+++ b/lang/python/helpers.c
@@ -207,7 +207,12 @@ static gpgme_error_t pyPassphraseCb(void *hook,
       if (PyBytes_Check(retval))
         buf = PyBytes_AsString(retval), len = PyBytes_Size(retval);
       else if (PyUnicode_Check(retval))
-        buf = PyUnicode_AsUTF8AndSize(retval, &len);
+        {
+          Py_ssize_t ssize;
+          buf = PyUnicode_AsUTF8AndSize(retval, &ssize);
+          assert (! buf || ssize >= 0);
+          len = (size_t) ssize;
+        }
       else
         {
           PyErr_Format(PyExc_TypeError,
@@ -634,7 +639,6 @@ gpgme_error_t pygpgme_data_new_from_cbs(gpgme_data_t *r_data,
     pyDataSeekCb,
     pyDataReleaseCb,
   };
-  PyObject *dataarg = NULL;
 
   assert (PyTuple_Check(pycbs));
   assert (PyTuple_Size(pycbs) == 5 || PyTuple_Size(pycbs) == 6);

-----------------------------------------------------------------------

Summary of changes:
 lang/python/Makefile.am | 2 +-
 lang/python/helpers.c   | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list