You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a habit of not passing all parameters into function calls if I don't strictly need them. For GObject functions which explicitly accept NULL, that's not a problem. It only becomes an issue when I try to opt out of passing a bit flags parameter, as I expect LGI to default to using 0. In these cases, I currently need to explicitly pass 0 or a flag which resolves to 0 to achieve this. Given Lua's dynamically typed nature, this feels like an opportunity to give the user some leeway.
The text was updated successfully, but these errors were encountered:
vtrlx
added a commit
to vtrlx/lgi
that referenced
this issue
Dec 4, 2024
This allows the user to opt out of passing flags into functions when
there are none to specify. While libraries in statically typed languages
expect users to pass in an explicit _NONE flag, Lua's ability to pass a
variable number of parameters could easily be interpreted as explicitly
not giving any flags when none are passed.
Fixeslgi-devs#329
vtrlx
linked a pull request
Dec 4, 2024
that will
close
this issue
I have a habit of not passing all parameters into function calls if I don't strictly need them. For GObject functions which explicitly accept NULL, that's not a problem. It only becomes an issue when I try to opt out of passing a bit flags parameter, as I expect LGI to default to using 0. In these cases, I currently need to explicitly pass 0 or a flag which resolves to 0 to achieve this. Given Lua's dynamically typed nature, this feels like an opportunity to give the user some leeway.
The text was updated successfully, but these errors were encountered: