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

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

Revision 1.1, Sun Jan 6 11:21:06 2019 UTC (20 months, 2 weeks ago) by markd
Branch: MAIN

{py-,}protobuf: update to 3.6.1

minor changes.
patches for python3.7
build py-protobuf with "--cpp_implementation" to get _message extension

$NetBSD: patch-python_google_protobuf_pyext_descriptor_containers.cc,v 1.1 2019/01/06 11:21:06 markd Exp $

python3.7 fixes 

--- python/google/protobuf/pyext/descriptor_containers.cc.orig	2018-07-30 22:16:10.000000000 +0000
+++ python/google/protobuf/pyext/descriptor_containers.cc
@@ -66,7 +66,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