jhass / crystal-gobject

gobject-introspection for Crystal
BSD 3-Clause "New" or "Revised" License
127 stars 13 forks source link

Generated code fail to compile with Crystal 1.0.0. #82

Closed hugopl closed 3 years ago

hugopl commented 3 years ago

Crystal ~0.36~ 1.0.0 doesn't cast nil to Pointer(T).null anymore, so the binding generator should rewrite some expressions to use Pointer(T).null instead of nil.

An early attempt to fix this, with some tests, can be found at: https://github.com/jhass/crystal-gobject/pull/81

hugopl commented 3 years ago

:tada: :tada:

Thanks very very much, this fix was on my todo list, but with very a low priority among the tons of things I'm doing.

BTW the fix was way more simpler than the monstrosity I was doing.

JeysonFlores commented 3 years ago

Thanks for fixing this problem. I can finally start doing stuff!