You can splat into the AST which @ccall
is a part of, provided you do it before macro expansion. For example:
@eval @ccall printf("%d %d %d %d %d\n"::Cstring, $((:($i::Cint) for i in 1:5)...))::Cint
But it’s unlikely that it’s a good idea to use @eval
like this! What’s your surrounding code look like for this use case?