Skip to content
Snippets Groups Projects
  1. Sep 05, 2022
  2. Aug 31, 2022
    • Alberto Miranda's avatar
      Merge branch '46-refactor-api-conversion-types' into 'main' · 096f91c2
      Alberto Miranda authored
      Resolve "Refactor API conversion types"
      
      This MR separates the functionality of `managed_rpc_type<T>` into
      dedicated lifetime management types and conversion functions. This
      makes for clearer the code since it is now possible to know when
      a conversion is performed.
      
      Lifetime management for C-types is now done with the `managed_ctype<T>`
      types, which act only as holders of dynamically allocated C types and do not
      perform any type conversions whatsoever.
      
      Type conversions are now done with the `T1 convert(T2 obj)` family of functions.
      When converting from CXX to C API types, these functions effectively
      return instances of the appropriate `managed_ctype<T>`s. If one wishes to
      relinquish ownership of the content of the `managed_ctype<T>` (e.g. to
      pass it to a pure C function that will release it), this can be done
      with the `managed_ctype<T>::release()` function.
      
      Closes #46
      
      See merge request !32
      096f91c2
    • Alberto Miranda's avatar
      Separate managed_rpc_type lifetime management from type conversion · 70a8dfb7
      Alberto Miranda authored
      This commit separates the functionality of managed_rpc_type<T> into
      dedicated lifetime management types and conversion functions. This
      makes for clearer the code since it is now possible to know when
      a conversion is performed.
      
      Lifetime management for C-types is now done with the managed_ctype<T>
      types, which act only as holders of dynamically allocated C types and do not
      perform any type conversions whatsoever.
      
      Type conversions are now done with the T1 convert(T2 obj) family of functions.
      When converting from CXX to C API types, these functions effectively
      return instances of the appropriate managed_ctype<T>s. If one wishes to
      relinquish ownership of the content of the managed_ctype<T> (e.g. to
      pass it to a pure C function that will release it), this can be done
      with the managed_ctype<T>::release() function.
      70a8dfb7
  3. Aug 30, 2022
  4. Aug 23, 2022
  5. Jul 29, 2022
Loading