Closed ttytm closed 1 month ago
Updating the return type of webui_get_best_browser to webui_browser instead of size_t
Actually, WebUI is designed to use size_t
in APIs as much as possible to make creating wrappers easy, standard, and straightforward. Otherwise we should make it a type def, and wrappers should either have same data type, or cast it to size_t
. I prefer to keep it explicitly size_t
.
config/browser instead of configs/browsers this change shouldn't cause any breaks for one of the wrappers
Fair enough, I'm okay with that.
I see, and good points. I would paddel back on the first point and also prefer to keep it the size_t to not require API changes in the wrappers.
I'd remove the first of the commits then and just keep the name changes if that's fine.
At the current updated state the updates would include a break.
Changing webui_config
to webui_set_config
to remove a conflict in names.
Alternatively, using as a different enum name would work without breaking changes.
Since webui_config is a freshly introduced function it could be okay to fine tune it before the next release, it would match with other function names that _set_
. Let me know your preference please.
LGTM.
The PR is mainly about making signatures more expressive.
Updating the return type ofwebui_get_best_browser
towebui_browser
instead of size_t.config
/browser
instead ofconfigs
/browsers
.While the C enum names are used in the public function signatures to indicate types, there is no direct "outside" usage of the actual C enum names. So, afaik, this change shouldn't cause any breaks for one of the wrappers and should just improve expressiveness.