Skip to content

gen-guest-c: optional parameters with null pointers #451

@guybedford

Description

@guybedford

In the C guest generator, functions which have optional parameters of the form:

x: func(a: option<a>, b: option<b>) -> _

Currently output signatures like:

void interface_x(interface_option_a_t *a, interface_option_b_t *b);

Where it would be nice to support the more C-like interface:

void interface_x(interface_a_t *a, interface_b_t *b);

where a null pointer could be used to imply the optional parameter value instead.

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