v3.0.0
New libmodule release; highlights:
New Features
- You can now send any data through libmodule pubsub api
- Avoid strdupping /mallocing data sent through pubsub api, trusting user pointers
Api breaks
- module_register_fd() now takes an autoclose boolean parameter; set it to true if you wish the fd to be closed at module stop or at fd deregistration.
- module_register_fd() now takes an userptr, that will be forwarded in receive() callback through msg->fd_msg->userptr.
- module_deregister_fd() does not take a "close" parameter anymore
- modules_quit() now takes an "exit_code" parameter. Its value will be returned by modules_loop.
- Dropped module_update_fd() function
- Dropped module_add_fd() alias function (it was aliasing module_register_fd())
- Dropped module_rm_fd() alias function (it was aliasing module_deregister_fd())
Generic improvements
- Install license file in /usr/share/licenses/libmodule/
- Added 2 more headers: <module/module_easy.h> and <module/modules_easy.h>
- constify as much as possible
- MODULE ctor now has a lower priority; this way a developer can calls its own ctors before
- Use stdbool where needed
Fixes
- Always use memhook!
- Fixed memleak in hashmap_rehash() internal function
- Avoid stopping an already-stopped module when deregistering a module