summaryrefslogtreecommitdiff
path: root/dev-libs/liborcus/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-17 20:32:17 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-17 20:32:17 +0100
commit83b5cde41ddb8fd20de4536dd68eb08da42d013e (patch)
tree6a993cfe0eb5a8024c508e9f6a6de02538f7c52e /dev-libs/liborcus/files
parent9c26151d84a72781f240cc7ca3e2f0ab4ba60f74 (diff)
gentoo auto-resync : 17:07:2022 - 20:32:17
Diffstat (limited to 'dev-libs/liborcus/files')
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.2-clang.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch b/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch
new file mode 100644
index 000000000000..62950cfcecb9
--- /dev/null
+++ b/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch
@@ -0,0 +1,26 @@
+https://gitlab.com/orcus/orcus/-/commit/469aca3c76965b9031947506a15d940cbcd11cdb
+
+From: Tom Stellard <tstellar@redhat.com>
+Date: Mon, 16 May 2022 22:12:30 +0000
+Subject: [PATCH] Fix error when compiling with clang
+
+csv.cpp:83:29: error: non-constant-expression cannot be narrowed from type 'Py_ssize_t' (aka 'long') to 'std::basic_string_view::size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
+ app.read_stream({p, n});
+ ^
+csv.cpp:83:29: note: insert an explicit cast to silence this issue
+ app.read_stream({p, n});
+ ^
+ static_cast<size_type>( )
+1 error generated.
+--- a/src/python/csv.cpp
++++ b/src/python/csv.cpp
+@@ -80,7 +80,7 @@ PyObject* csv_read(PyObject* /*module*/, PyObject* args, PyObject* kwargs)
+
+ Py_ssize_t n = 0;
+ const char* p = PyUnicode_AsUTF8AndSize(str.get(), &n);
+- app.read_stream({p, n});
++ app.read_stream({p, static_cast<std::string_view::size_type>(n)});
+
+ return create_document(std::move(doc));
+ }
+GitLab