Skip to content

Naming conflict with cr_realloc #587

@yayuwang0624

Description

@yayuwang0624

I encountered a naming conflict when testing QuickJS as a dynamic library with Criterion.

Criterion side

CR_API void *cr_realloc(void *ptr, size_t size);

QuickJS side https://github.com/bellard/quickjs/blob/c73a435f365e5250dd529cde00675528d7609edf/libunicode.h#L53

int cr_realloc(CharRange *cr, int size);

Somehow, the quickjs internal invokes the Criterion cr_realloc function instead of its own one, and causes allocation failure.

I wonder if there is a recommended way to avoid this conflict when using Criterion with libraries that have functions named cr_*?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions