Skip to content

convience methods for c connector (tp.h) so that client code doesn't need to access tp struct fields directly #17

@IlyaM

Description

@IlyaM

Can the following functions be added to tp.h? This improves client code readability for common use cases since it no longer needs to access 's' field in tp struct directly.


static inline void tp_free(struct tp *p) {
    free(p->s);
}

static inline char* tp_buf(struct tp *p) {
    return p->s;
}

Metadata

Metadata

Assignees

No one assigned

    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