Debian Codegraph @

debian/patches/atspi_cpp

raw
1 commit 5eed251f9bb0bae10e2efe177e1054346c7347d1
2 Author: Yanko Kaneti <[email protected]>
3 Date: Thu Mar 25 16:37:44 2021 +0200
4
5 Remove extern "C" warpper around atspi/glib headers inclusion
6
7 Recently glib headers started using C++ features when compled in C++
8 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715/commits
9
10 This leads to errors like:
11 ..
12 In file included from /usr/include/glib-2.0/glib/gatomic.h:31,
13 from /usr/include/glib-2.0/glib/gthread.h:32,
14 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
15 from /usr/include/glib-2.0/glib.h:32,
16 from /usr/include/at-spi-2.0/atspi/atspi.h:27,
17 from dasher_editor_external_atspi.cpp:5:
18 /usr/include/c++/11/type_traits:56:3: error: template with C linkage
19 56 | template<typename _Tp, _Tp __v>
20 | ^~~~~~~~
21 dasher_editor_external_atspi.cpp:4:1: note: 'extern "C"' linkage started here
22 4 | extern "C" {
23 | ^~~~~~~~~~
24 ..
25
26 Since for a while now glib headers are supposed to be safe to include in
27 C++ code without extern "C" just remove it.
28
29 diff --git a/Src/Gtk2/dasher_editor_external_atspi.cpp b/Src/Gtk2/dasher_editor_external_atspi.cpp
30 index 76f637ac..6492c479 100644
31 --- a/Src/Gtk2/dasher_editor_external_atspi.cpp
32 +++ b/Src/Gtk2/dasher_editor_external_atspi.cpp
33 @@ -1,9 +1,7 @@
34 #include <X11/keysym.h>
35 #include <string.h>
36
37 -extern "C" {
38 - #include <atspi/atspi.h>
39 -}
40 +#include <atspi/atspi.h>
41
42 #include "dasher_editor_external.h"
43 #include "dasher_editor_private.h"