Skip to content

pointers to undefined structs #58

@mlubin

Description

@mlubin

The pattern below is relatively common in header files:

typedef struct mysecretstruct SECRET;

void foo(SECRET*);

without any definition of mysecretstruct.

Right now, wrap_c will output

WARNING: Skipping empty struct: "mysecretstruct"

and produce:

function foo(::Ptr{SECRET})
  ccall( (:foo, test), None, (Ptr{SECRET},), )
end

which doesn't quite work because SECRET isn't defined anywhere in Julia. It seems like the right thing to do is produce Ptr{Void} here 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