Skip to content

Incremental read function needs char* but docs say const char* as first arg #210

@rath3t

Description

@rath3t

Describe the bug
I'm currently trying to use the new incremental read feature from #199 .
The docs say that

const char *dat = your_file.bytes;
//...
 
yyjson_incr_state  *state = yyjson_incr_new(dat, len, flg, NULL);

gives for me a compile time error since yyjson_incr_new expects a mutable char *.

Your environment

  • Compiler: clang++ 18

Additional context
The test use always a mutable pointer.

Can the first argument be a const char pointer or does only the documentation has to be changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions