Use macros to generate specialized type FFI functions #247

Open
opened 2020-08-06 16:57:18 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:57:18 +00:00 (Migrated from github.com)

Currenty in our FFI we have a number of functions that essentially to do the same thing but accepting different types. This is to make the API profile easier for consuming clients. However this makes for a lot of repetition of code and causes a lot of work to occur if Mentat's API changes in these areas.

This issue tracks creating Macros for generating type specific FFI functions to avoid duplication of work. These macros should cover the following FFI functions.

  • value_at_index_into_<type>
  • typed_value_into_<type>
  • query_builder_bind_<type>
  • entity_builder_retract_<type>
  • entity_builder_add_<type>
  • in_progress_builder_retract_<type>
  • in_progress_builder_add_<type>
Currenty in our FFI we have a number of functions that essentially to do the same thing but accepting different types. This is to make the API profile easier for consuming clients. However this makes for a lot of repetition of code and causes a lot of work to occur if Mentat's API changes in these areas. This issue tracks creating Macros for generating type specific FFI functions to avoid duplication of work. These macros should cover the following FFI functions. - `value_at_index_into_<type>` - `typed_value_into_<type>` - `query_builder_bind_<type>` - `entity_builder_retract_<type>` - `entity_builder_add_<type>` - `in_progress_builder_retract_<type>` - `in_progress_builder_add_<type>`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#247
No description provided.