Skip to content

Add a helper function for malloc and print in emit templates #1475

@scolsen

Description

@scolsen

There are a couple cases in which we we perform the following pattern in templates:

String buf = CARP_MALLOC(n);
snprintf(buf, n, "some string of len n");

we could wrap these with allocBufferAndPrint "string" computing size based on "string" length.

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