Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc API cleanup #24

Open
6 tasks
marktsuchida opened this issue Nov 22, 2022 · 0 comments
Open
6 tasks

Misc API cleanup #24

marktsuchida opened this issue Nov 22, 2022 · 0 comments

Comments

@marktsuchida
Copy link
Member

  • Functions returning arrays of borrowed objects (OSc_GetAllDevices(), OSc_Device_GetSettings()) should not return borrowed array. Instead they should copy into caller-provided array (or introduce a PtrArray type).
  • Functions returning strings should standardized to using fixed-size (OSc_MAX_STR_SIZE) buffers: OSc_Device_GetName() and OSc_Device_GetDisplayName().
  • Avoid losing information: separate OSc_Device_GetDisplayName() into two functions, for model name and device name.
  • OSc_SetDeviceModuleSearchPaths() parameter type should be const char *const *.
  • Error-related functions that write to string buffer should return would-be-written string length rather than void.
  • Settings functions returning arrays of numbers should avoid returning internal pointer (whose lifetime is hard to specify) and copy to caller-provided buffer (or introduce NumArray type).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant