use a local version (copy) of the G_SOURCE_FUNC macro, since it is not available in the GTK+ version we use for the official build stack
This commit is contained in:
parent
2f167e6163
commit
60ccbcf9cc
@ -41,6 +41,10 @@ using namespace Glib;
|
||||
#include "crossthread.win.cc"
|
||||
#endif
|
||||
|
||||
#ifndef G_SOURCE_FUNC
|
||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
cross_thread_channel_call_receive_slot (GIOChannel*, GIOCondition condition, void *data)
|
||||
{
|
||||
@ -58,6 +62,7 @@ void
|
||||
CrossThreadChannel::attach (Glib::RefPtr<Glib::MainContext> context)
|
||||
{
|
||||
receive_source = g_io_create_watch (receive_channel, GIOCondition(G_IO_IN|G_IO_PRI|G_IO_ERR|G_IO_HUP|G_IO_NVAL));
|
||||
g_source_set_callback (receive_source, (GSourceFunc) cross_thread_channel_call_receive_slot, this, NULL);
|
||||
|
||||
g_source_set_callback (receive_source, G_SOURCE_FUNC(cross_thread_channel_call_receive_slot), this, NULL);
|
||||
g_source_attach (receive_source, context->gobj());
|
||||
}
|
||||
|
@ -10,6 +10,10 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef G_SOURCE_FUNC
|
||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
|
||||
#endif
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION (TimerTest);
|
||||
|
||||
using namespace std;
|
||||
|
@ -81,6 +81,10 @@
|
||||
#include "fader.h"
|
||||
#include "pot.h"
|
||||
|
||||
#ifndef G_SOURCE_FUNC
|
||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
|
||||
#endif
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace std;
|
||||
using namespace PBD;
|
||||
@ -942,7 +946,7 @@ MackieControlProtocol::create_surfaces ()
|
||||
ipm->mcp = this;
|
||||
ipm->port = &input_port;
|
||||
|
||||
g_source_set_callback (surface->input_source, (GSourceFunc) ipmidi_input_handler, ipm, NULL);
|
||||
g_source_set_callback (surface->input_source, G_SOURCE_FUNC (ipmidi_input_handler), ipm, NULL);
|
||||
g_source_attach (surface->input_source, main_loop()->get_context()->gobj());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user