Skip to content

native/type fails to generate working typedef #5

Description

@hendrenja

In an attempt to create generated functions with void* parameters, I tried using native/type type to define a void* type in the model.cx file.

native/type NativeVoidType: "void*"

class TypeConvert:/
    int16 Cast(
        string src,
        NativeVoidType dest,
        type t)

Generates: _type.h

/* Native types */
#ifndef APOLLO_H
typedef void* void;
#endif

Error

warn src/install.c:162 (bake_uninstall) missing uninstaller for project 'apollo'
In file included from /home/hendren/.corto/include/corto/2.0/apollo/c/_api.h:12:0,
                 from /home/hendren/.corto/include/corto/2.0/apollo/c/c.h:1,
                 from src/_api.c:7:
/home/hendren/.corto/include/corto/2.0/apollo/_type.h:32:15: error: expected identifier or ‘(’ beforevoidtypedef void* void;
               ^~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions