Skip to content

Commit

Permalink
Use ::Box to avoid confusion with Gtk::Box.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugopl committed Jul 11, 2024
1 parent 717e4c0 commit 1c2728c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generator/arg_strategy.cr
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ module Generator

callback_var = to_identifier(arg.name)
user_data_var = to_identifier(strategies[idx + 1].arg.name)
io << user_data_var << " = Box.box(" << callback_var << ")\n"
io << user_data_var << " = ::Box.box(" << callback_var << ")\n"
io << callback_var << " = if " << callback_var << ".nil?\n"
io << " Pointer(Void).null\n"
io << "else\n"
io << " ->(gobject : Void*, result : Void*, box : Void*) {\n"
io << " unboxed_callback = Box(Gio::AsyncReadyCallback).unbox(box)\n"
io << " unboxed_callback = ::Box(Gio::AsyncReadyCallback).unbox(box)\n"
io << " GICrystal::ClosureDataManager.deregister(box)\n"
io << " unboxed_callback.call(typeof(self).new(gobject, :none), Gio::AbstractAsyncResult.new(result, :none))\n"
io << " }.pointer\n"
Expand Down

0 comments on commit 1c2728c

Please sign in to comment.