Skip to content

Move reinterpret_cast<> calls into MAKE_*_API macros in C layer  #316

Open
@billschereriii

Description

@billschereriii

Description

We have a consistent handling of the way we translate from the C-layer void* to the C++ objects in each of the C layer API methods, so it should be possible to unify this handling and hide it inside the template, further reducing the LOC in the interface

Justification

More standardization improves maintenance

Implementation Strategy

The arguments to the template's lambda function capture might be able to include a reinterpret_cast of the void* object passed in from C. This would requires consistent naming and for the name in the capture to not be evaluated until the capture is performed (which may be inconsistent with C++ specs, in which case this won't work at all). If it does work, it's a relatively simple way to eliminate another hundred lines or so of code from the C interface layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: CIssues related to the C clienttype: refactorIssues focused on refactoring existing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions