Re: Is the “not nullable” attribute m eaningful for G(S)Lists?



On 04/01/2016 22:01, Philip Withnall wrote:
On Mon, 2015-12-28 at 16:37 +0100, Max Reeves wrote:
I'm currently working on a binding from libraries with GIR data to
Standard ML, so I'm concerned what approach I should use to pass “not
nullable� G(S)List or if I should completely ignore it. Are there any
introspectable code conventions I should know about that regulates
this?

I think other bindings treat GList and GSList specially (as they do
with other inbuilt GLib types, like GHashTable and GPtrArray), so I
suggest you do the same. This probably means assuming that GList
parameters are (nullable) by default, and perhaps emitting a warning if
a GList parameter is marked as (not nullable), because that is
nonsensical.

(not nullable) could be used to mean a non-empty list, which is a potentially useful concept but I don't know of any example functions that require or guarantee non-empty lists.

Phil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]