StefanSalewski / gintro

High level GObject-Introspection based GTK3/GTK4 bindings for Nim language
MIT License
296 stars 20 forks source link

nice_agent_recv() function in libnice is wrapped incorrectly #113

Open demotomohiro opened 3 years ago

demotomohiro commented 3 years ago

buf_len parameter of nice_agent_recv and nice_agent_recv_nonblocking in libnice are gsize type, but corresponding parameters of nice_agent_recv and nice_agent_recv_nonblocking proc in nice module generated by gintro are var uint64 type. They should not be var parameters.

StefanSalewski commented 3 years ago

See

https://discourse.gnome.org/t/nice-agent-recv/5747

demotomohiro commented 3 years ago

Thank you!

I have sent merge request to libnice repository to add (in) annotation to buf_len. https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/189

StefanSalewski commented 3 years ago

Great. I was going to create an issue, but your merge request is much better!

I just shipped v0.8.8. I tried to add a manually fix for your issue with

if sym in ["nice_agent_recv", "nice_agent_recv_nonblocking"] and name == "bufLen":
      needVar = false

in gen.nim file. Hope it works.

demotomohiro commented 3 years ago

Thank you!

I have installed v0.8.8. buf_len parameter has correct type.

demotomohiro commented 3 years ago

My merge request sent to libnice project has been merged. https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/189