Merge lp:~michihenning/unity/fix-c-linkage-1163719 into lp:unity/phablet

Proposed by Michał Sawicz
Status: Merged
Approved by: Albert Astals Cid
Approved revision: no longer in the source branch.
Merged at revision: 546
Proposed branch: lp:~michihenning/unity/fix-c-linkage-1163719
Merge into: lp:unity/phablet
Diff against target: 62 lines (+17/-7)
1 file modified
plugins/HudClient/hudclient.cpp (+17/-7)
To merge this branch: bzr merge lp:~michihenning/unity/fix-c-linkage-1163719
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+157473@code.launchpad.net

This proposal supersedes a proposal from 2013-04-03.

Commit message

Fixes incorrect linkage for C++ function pointers passed to C API. See bug #1163719

Description of the change

Fixes incorrect linkage for C++ function pointers passed to C API. See bug #1163719

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Seems a huge diff for the small description it carries, maybe you forgot to make it depend in a pre-requisite branch?

Revision history for this message
Michi Henning (michihenning) wrote : Posted in a previous version of this proposal

My apologies, that's my Launchpad ignorance at work. Will resubmit.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

The diff is still wrong

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

Resubmitting for LP to come to senses.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Personally, i do prefer the static functions over the anonymous namespace, but not that it really matters

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/HudClient/hudclient.cpp'
2--- plugins/HudClient/hudclient.cpp 2013-02-14 16:39:59 +0000
3+++ plugins/HudClient/hudclient.cpp 2013-04-05 20:40:26 +0000
4@@ -20,41 +20,51 @@
5
6 #include <QDebug>
7
8-static void loadingCB(GObject* /*src*/, gpointer dst)
9+namespace
10+{
11+
12+extern "C"
13+{
14+
15+void loadingCB(GObject* /*src*/, gpointer dst)
16 {
17 static_cast<HudClient*>(dst)->voiceQueryLoading();
18 }
19
20-static void listeningCB(GObject* /*src*/, gpointer dst)
21+void listeningCB(GObject* /*src*/, gpointer dst)
22 {
23 static_cast<HudClient*>(dst)->voiceQueryListening();
24 }
25
26-static void heardSomethingCB(GObject* /*src*/, gpointer dst)
27+void heardSomethingCB(GObject* /*src*/, gpointer dst)
28 {
29 static_cast<HudClient*>(dst)->voiceQueryHeardSomething();
30 }
31
32-static void failedCB(GObject* /*src*/, const gchar * /*reason*/, gpointer dst)
33+void failedCB(GObject* /*src*/, const gchar * /*reason*/, gpointer dst)
34 {
35 static_cast<HudClient*>(dst)->voiceQueryFailed();
36 }
37
38-static void finishedCB(GObject* /*src*/, const gchar* query, gpointer dst)
39+void finishedCB(GObject* /*src*/, const gchar* query, gpointer dst)
40 {
41 static_cast<HudClient*>(dst)->voiceQueryFinished(QString::fromUtf8(query));
42 }
43
44-static void modelReadyCB(GObject* /*src*/, gpointer dst)
45+void modelReadyCB(GObject* /*src*/, gpointer dst)
46 {
47 static_cast<HudClient*>(dst)->modelReady(true);
48 }
49
50-static void modelReallyReadyCB(GObject* /*src*/, gint /*position*/, gint /*removed*/, gint /*added*/, gpointer dst)
51+void modelReallyReadyCB(GObject* /*src*/, gint /*position*/, gint /*removed*/, gint /*added*/, gpointer dst)
52 {
53 static_cast<HudClient*>(dst)->modelReallyReady(true);
54 }
55
56+} // extern "C"
57+
58+} // namespace
59+
60 HudClient::HudClient()
61 {
62 m_results = new DeeListModel();

Subscribers

People subscribed via source and target branches