Skip to content

Switch to opaque structs #39

@michael-grunder

Description

@michael-grunder

Right now, we declare valkeyContext, valkeyAsyncContext, valkeyClusterContext, and valkeyAsyncClusterContext in our public headers, exposing their memory layout.

This makes it a lot harder to make changes to them without breaking the ABI contract and therefore having to bump the SONAME.

We could switch to simply defining:

typedef struct valkeyContext valkeyContext;
typedef struct valkeyClusterContext valkeyClusterContext;

in our public headers, and declare the actual struct internally in a private header.

The only real downside is that it might break code for users who are directly accessing struct members. Personally, I can live with that 😄.

@bjosv @zuiderkwast What does everybody think?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions