@@ -281,7 +281,7 @@ function g_yield(data)
281
281
end
282
282
283
283
sizeof_gclosure = 0
284
- function __init__ ()
284
+ function __init__gtype__ ()
285
285
ccall ((:g_type_init ,libgobject),Void,())
286
286
global jlref_quark = quark " julia_ref"
287
287
global sizeof_gclosure = WORD_SIZE
@@ -291,12 +291,9 @@ function __init__()
291
291
closure = ccall ((:g_closure_new_simple ,libgobject),Ptr{Void},(Int,Ptr{Void}),sizeof_gclosure,C_NULL )
292
292
end
293
293
ccall ((:g_closure_sink ,libgobject),Void,(Ptr{Void},),closure)
294
+ end
294
295
295
- global JuliaClosureMarshal = cfunction (GClosureMarshal, Void,
296
- (Ptr{Void}, Ptr{GValue}, Cuint, Ptr{GValue}, Ptr{Void}, Ptr{Void}))
297
- global exiting = false
298
- atexit (()-> global exiting = true )
299
-
296
+ function __init__gmainloop__ ()
300
297
global uv_sourcefuncs = _GSourceFuncs (
301
298
cfunction (uv_prepare,Cint,(Ptr{Void},Ptr{Cint})),
302
299
cfunction (uv_check,Cint,(Ptr{Void},)),
@@ -318,3 +315,14 @@ function __init__()
318
315
ccall ((:g_source_unref ,GLib. libglib),Void,(Ptr{Void},),src)
319
316
end
320
317
318
+ function __init__ ()
319
+ if isdefined (GLib,:__init__bindeps__ )
320
+ GLib. __init__bindeps__ ()
321
+ end
322
+ global JuliaClosureMarshal = cfunction (GClosureMarshal, Void,
323
+ (Ptr{Void}, Ptr{GValue}, Cuint, Ptr{GValue}, Ptr{Void}, Ptr{Void}))
324
+ global exiting = false
325
+ atexit (()-> global exiting = true )
326
+ __init__gtype__ ()
327
+ __init__gmainloop__ ()
328
+ end
0 commit comments