opentechinstitute / commotiond

The system management daemon for the Commotion Wireless Project.
https://commotionwireless.net
GNU Affero General Public License v3.0
26 stars 21 forks source link

Consolidate multiple fixed-index types into single types #112

Open jheretic opened 9 years ago

jheretic commented 9 years ago

Libcommotion currently uses individual declarations for objects of the same 'type' with indexes of different sizes. Effectively, every _type tag has a corresponding set of constructor declarations. This has some advantages, but can be a hindrance when you want to have better code readability for APIs that wrap a set of functionality around a certain primitive type, for instance wanting to have a single 'co_string_t' that you can send to various string functions. By wrapping all access to object members in access functions per #111, we should be able to determine a way to have the best of both worlds with both specific function declarations, semi-specific object declarations, and generic object access.