Skip to content

Commit 57e2848

Browse files
committed
fix methods that return a GList of strings
1 parent 8198d3f commit 57e2848

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

GI/src/giimport.jl

+3
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,9 @@ function extract_type(typeinfo::GITypeInfo,listtype::Type{T}) where {T<:GLib._LL
758758
@assert is_pointer(typeinfo)
759759
elm = get_param_type(typeinfo,0)
760760
elmtype = extract_type(elm).ctype
761+
if elmtype === :(Cstring)
762+
elmtype = :(String)
763+
end
761764
lt = listtype == GLib._GSList ? :(GLib._GSList) : :(GLib._GList)
762765
TypeDesc{Type{GList}}(GList, :(GLib.LList{$lt{$elmtype}}),:(GLib.LList{$lt{$elmtype}}), :(Ptr{$lt{$elmtype}}))
763766
end

src/gen/gio_functions

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ $(Expr(:toplevel, quote
273273
nothing
274274
end
275275
function content_types_get_registered()
276-
ret = ccall(("g_content_types_get_registered", libgio), Ptr{GLib._GList{Cstring}}, ())
276+
ret = ccall(("g_content_types_get_registered", libgio), Ptr{GLib._GList{String}}, ())
277277
ret2 = GLib.GList(ret, true)
278278
ret2
279279
end

src/gen/gio_methods

+6-6
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ $(Expr(:toplevel, quote
18351835
ret = ccall(("g_desktop_app_info_launch_action", libgio), Nothing, (Ptr{GObject}, Cstring, Ptr{GObject}), instance, _action_name, _launch_context_maybe)
18361836
nothing
18371837
end
1838-
function launch_uris_as_manager(instance::GDesktopAppInfo, _uris::GLib.LList{GLib._GList{Cstring}}, _launch_context::Maybe(GAppLaunchContext), _spawn_flags, _user_setup::Maybe(Function), _pid_callback::Maybe(Function))
1838+
function launch_uris_as_manager(instance::GDesktopAppInfo, _uris::GLib.LList{GLib._GList{String}}, _launch_context::Maybe(GAppLaunchContext), _spawn_flags, _user_setup::Maybe(Function), _pid_callback::Maybe(Function))
18391839
_launch_context_maybe = nothing_to_null(_launch_context)
18401840
if _user_setup === nothing
18411841
_user_setup_cfunc = C_NULL
@@ -1855,12 +1855,12 @@ $(Expr(:toplevel, quote
18551855
end
18561856
end
18571857
err = err_buf()
1858-
ret = ccall(("g_desktop_app_info_launch_uris_as_manager", libgio), Cint, (Ptr{GObject}, Ptr{GLib._GList{Cstring}}, Ptr{GObject}, UInt32, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Ptr{GError}}), instance, _uris, _launch_context_maybe, _spawn_flags, _user_setup_cfunc, _user_setup_closure, _pid_callback_cfunc, _pid_callback_closure, err)
1858+
ret = ccall(("g_desktop_app_info_launch_uris_as_manager", libgio), Cint, (Ptr{GObject}, Ptr{GLib._GList{String}}, Ptr{GObject}, UInt32, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Ptr{GError}}), instance, _uris, _launch_context_maybe, _spawn_flags, _user_setup_cfunc, _user_setup_closure, _pid_callback_cfunc, _pid_callback_closure, err)
18591859
check_err(err)
18601860
ret2 = convert(Bool, ret)
18611861
ret2
18621862
end
1863-
function launch_uris_as_manager_with_fds(instance::GDesktopAppInfo, _uris::GLib.LList{GLib._GList{Cstring}}, _launch_context::Maybe(GAppLaunchContext), _spawn_flags, _user_setup::Maybe(Function), _pid_callback::Maybe(Function), _stdin_fd::Integer, _stdout_fd::Integer, _stderr_fd::Integer)
1863+
function launch_uris_as_manager_with_fds(instance::GDesktopAppInfo, _uris::GLib.LList{GLib._GList{String}}, _launch_context::Maybe(GAppLaunchContext), _spawn_flags, _user_setup::Maybe(Function), _pid_callback::Maybe(Function), _stdin_fd::Integer, _stdout_fd::Integer, _stderr_fd::Integer)
18641864
_launch_context_maybe = nothing_to_null(_launch_context)
18651865
if _user_setup === nothing
18661866
_user_setup_cfunc = C_NULL
@@ -1880,7 +1880,7 @@ $(Expr(:toplevel, quote
18801880
end
18811881
end
18821882
err = err_buf()
1883-
ret = ccall(("g_desktop_app_info_launch_uris_as_manager_with_fds", libgio), Cint, (Ptr{GObject}, Ptr{GLib._GList{Cstring}}, Ptr{GObject}, UInt32, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Cvoid}, Ptr{Nothing}, Int32, Int32, Int32, Ptr{Ptr{GError}}), instance, _uris, _launch_context_maybe, _spawn_flags, _user_setup_cfunc, _user_setup_closure, _pid_callback_cfunc, _pid_callback_closure, _stdin_fd, _stdout_fd, _stderr_fd, err)
1883+
ret = ccall(("g_desktop_app_info_launch_uris_as_manager_with_fds", libgio), Cint, (Ptr{GObject}, Ptr{GLib._GList{String}}, Ptr{GObject}, UInt32, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Cvoid}, Ptr{Nothing}, Int32, Int32, Int32, Ptr{Ptr{GError}}), instance, _uris, _launch_context_maybe, _spawn_flags, _user_setup_cfunc, _user_setup_closure, _pid_callback_cfunc, _pid_callback_closure, _stdin_fd, _stdout_fd, _stderr_fd, err)
18841884
check_err(err)
18851885
ret2 = convert(Bool, ret)
18861886
ret2
@@ -1939,10 +1939,10 @@ $(Expr(:toplevel, quote
19391939
function launch(instance::GDesktopAppInfo, _files::Maybe(GLib.LList{GLib._GList{Ptr{GObject}}}), _context::Maybe(GAppLaunchContext))
19401940
launch(GAppInfo(instance), _files, _context)
19411941
end
1942-
function launch_uris(instance::GDesktopAppInfo, _uris::Maybe(GLib.LList{GLib._GList{Cstring}}), _context::Maybe(GAppLaunchContext))
1942+
function launch_uris(instance::GDesktopAppInfo, _uris::Maybe(GLib.LList{GLib._GList{String}}), _context::Maybe(GAppLaunchContext))
19431943
launch_uris(GAppInfo(instance), _uris, _context)
19441944
end
1945-
function launch_uris_async(instance::GDesktopAppInfo, _uris::Maybe(GLib.LList{GLib._GList{Cstring}}), _context::Maybe(GAppLaunchContext), _cancellable::Maybe(GCancellable), _callback::Maybe(Function))
1945+
function launch_uris_async(instance::GDesktopAppInfo, _uris::Maybe(GLib.LList{GLib._GList{String}}), _context::Maybe(GAppLaunchContext), _cancellable::Maybe(GCancellable), _callback::Maybe(Function))
19461946
launch_uris_async(GAppInfo(instance), _uris, _context, _cancellable, _callback)
19471947
end
19481948
function launch_uris_finish(instance::GDesktopAppInfo, _result::GAsyncResult)

0 commit comments

Comments
 (0)