From 612b4b4b4f4e5105c8e5bd588046893ade2851fe Mon Sep 17 00:00:00 2001 From: Michael Kleehammer Date: Sat, 25 Feb 2017 16:36:01 -0600 Subject: [PATCH] Fix 2.7 build error. The generated Object ctor was being used in 2.7 builds. Now that it is private (because it shouldn't be used) we get a build error. --- src/textenc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textenc.cpp b/src/textenc.cpp index c2b3a248..68c8dd82 100644 --- a/src/textenc.cpp +++ b/src/textenc.cpp @@ -29,7 +29,7 @@ PyObject* EncodeStr(PyObject* str, const TextEnc& enc) else { // Encode the text with the user's encoding. - Object encoded = PyCodec_Encode(str, enc.name, "errors"); + Object encoded(PyCodec_Encode(str, enc.name, "strict")); if (!encoded) return 0;