Clang.jl icon indicating copy to clipboard operation
Clang.jl copied to clipboard

Support for `using`

Open vchuravy opened this issue 2 years ago • 3 comments
trafficstars

/// These callbacks are used to return multiple types from functions while
/// transferring ownership to the caller. The first argument is the number of
/// consecutive elements pointed to by the second argument. The third argument
/// is an opaque pointer forwarded to the callback by the caller.
using MlirTypesCallback = void (*)(intptr_t, MlirType *, void *);

Lead to:

/home/vchuravy/.julia/artifacts/c90711842814121dacf839a59bca4c40f573cbff/include/mlir-c/Interfaces.h:51:1: error: unknown type name 'using'
/home/vchuravy/.julia/artifacts/c90711842814121dacf839a59bca4c40f573cbff/include/mlir-c/Interfaces.h:51:27: error: expected expression
/home/vchuravy/.julia/artifacts/c90711842814121dacf839a59bca4c40f573cbff/include/mlir-c/Interfaces.h:60:45: error: unknown type name 'MlirTypesCallback'

vchuravy avatar May 03 '23 21:05 vchuravy

using MlirTypesCallback = void (*)(intptr_t, MlirType *, void *);

this is actually C++, C doesn't have the using keyword.

Gnimuc avatar May 04 '23 03:05 Gnimuc

I see I will need to grumble at upstream for putting that into a C header

vchuravy avatar May 04 '23 03:05 vchuravy

Is there a way to work around this in Clang.jl?

vchuravy avatar May 16 '23 00:05 vchuravy

closed by #480, #432, #435

Gnimuc avatar Apr 08 '24 12:04 Gnimuc