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
Notcurses version: 3.0.11, but also applies to the website
When reading the documentation for notcurses_selector(3), it was not clear to me whether or not the ncselector_item structures used by ncselector_additem were only used for their values (the name and description were to be copied) or were referenced outright, requiring the caller to keep track of the structure in the future. Only upon reading the source code of the library was I able to verify that this is the former.
Perhaps the description could be clarified by stating something like "The ncselector_additem function does not create an extra reference to the item argument's structure, allowing it to be erased or reused for other items later."
The text was updated successfully, but these errors were encountered:
Perhaps the same could be done with the items array in the ncselector_options struct used for ncselector_create -- as its contents are also copied into the actual selector's structure, and the fact its defined as a struct ncselector_item* without any const qualifiers makes it seem even more as if its contents are referenced, rather than copied.
Notcurses version: 3.0.11, but also applies to the website
When reading the documentation for
notcurses_selector(3)
, it was not clear to me whether or not thencselector_item
structures used byncselector_additem
were only used for their values (the name and description were to be copied) or were referenced outright, requiring the caller to keep track of the structure in the future. Only upon reading the source code of the library was I able to verify that this is the former.Perhaps the description could be clarified by stating something like "The ncselector_additem function does not create an extra reference to the item argument's structure, allowing it to be erased or reused for other items later."
The text was updated successfully, but these errors were encountered: