[evince/gpoo/wip/use-only-c] Remove c++ dependency, and use only C
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gpoo/wip/use-only-c] Remove c++ dependency, and use only C
- Date: Sun, 27 Jun 2021 17:25:24 +0000 (UTC)
commit c5f1005bf83e71445ce989ae74530dcc4c00f215
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Sun Jun 27 12:41:49 2021 -0400
Remove c++ dependency, and use only C
ev-poppler.cc was the remaining file depending on C++, but it is
C code. If in the future we need C++ to access Poppler, it can
be changed back.
backend/meson.build | 2 +-
backend/pdf/{ev-poppler.cc => ev-poppler.c} | 6 ++++++
backend/pdf/meson.build | 4 ++--
meson.build | 3 +--
4 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/backend/meson.build b/backend/meson.build
index d1f6fe07..14629f2f 100644
--- a/backend/meson.build
+++ b/backend/meson.build
@@ -12,7 +12,7 @@ backends_cflags = [
]
backends_symbol_map = join_paths(meson.current_source_dir(), 'backend-symbol.map')
-backends_ldflags = cpp.get_supported_link_arguments('-Wl,--version-script,' + backends_symbol_map)
+backends_ldflags = cc.get_supported_link_arguments('-Wl,--version-script,' + backends_symbol_map)
foreach backend, backend_mime_types: backends
backend_name = backend + 'document'
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.c
similarity index 99%
rename from backend/pdf/ev-poppler.cc
rename to backend/pdf/ev-poppler.c
index 91cc2a29..8f851edb 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.c
@@ -805,7 +805,10 @@ pdf_document_get_localized_object_from_metadata (xmlXPathContextPtr xpathCtx,
g_free (tag);
tag = tag_aux;
}
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wformat-nonliteral"
aux = g_strdup_printf (xpath, tag);
+ #pragma GCC diagnostic pop
loc_object = (gchar *)pdf_document_get_xmptag_from_path (xpathCtx, aux);
g_free (tag);
g_free (aux);
@@ -814,7 +817,10 @@ pdf_document_get_localized_object_from_metadata (xmlXPathContextPtr xpathCtx,
/* 2) if not, use the default string */
if (!loc_object) {
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wformat-nonliteral"
aux = g_strdup_printf (xpath, "x-default");
+ #pragma GCC diagnostic pop
loc_object = (gchar *)pdf_document_get_xmptag_from_path (xpathCtx, aux);
g_free (aux);
}
diff --git a/backend/pdf/meson.build b/backend/pdf/meson.build
index f89fce2b..32020319 100644
--- a/backend/pdf/meson.build
+++ b/backend/pdf/meson.build
@@ -7,10 +7,10 @@ deps = backends_deps + [
shared_module(
backend_name,
- sources: 'ev-poppler.cc',
+ sources: 'ev-poppler.c',
include_directories: backends_incs,
dependencies: deps,
- cpp_args: backends_cflags,
+ c_args: backends_cflags,
link_args: backends_ldflags,
link_depends: backends_symbol_map,
install: true,
diff --git a/meson.build b/meson.build
index e5c401b2..124552a7 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project(
- 'evince', ['c', 'cpp'],
+ 'evince', ['c'],
version: '41.alpha',
license: 'GPL2+',
default_options: 'buildtype=debugoptimized',
@@ -72,7 +72,6 @@ ev_code_prefix = 'Ev'
ev_debug = get_option('buildtype').contains('debug')
cc = meson.get_compiler('c')
-cpp = meson.get_compiler('cpp')
config_h = configuration_data()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]