[BACK]Return to patch-python_google_protobuf_pyext_descriptor_pool.cc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / py-protobuf / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / py-protobuf / patches / Attic / patch-python_google_protobuf_pyext_descriptor_pool.cc (download)

Revision 1.1, Tue Jan 8 05:56:19 2019 UTC (5 years, 3 months ago) by markd
Branch: MAIN

{py-,}protobuf: don't share the patches directory
some patches only apply to py-protobuf.

$NetBSD: patch-python_google_protobuf_pyext_descriptor_pool.cc,v 1.1 2019/01/08 05:56:19 markd Exp $

python3.7 fixes 

--- python/google/protobuf/pyext/descriptor_pool.cc.orig	2018-07-30 22:16:10.000000000 +0000
+++ python/google/protobuf/pyext/descriptor_pool.cc
@@ -48,7 +48,7 @@
   #endif
   #define PyString_AsStringAndSize(ob, charpp, sizep) \
     (PyUnicode_Check(ob)? \
-       ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
+       ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
        PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
 #endif