c3lang / c3c

Compiler for the C3 language

Home Page:https://c3-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C's va_list in C3

Wiguwbe opened this issue · comments

Hi there,

I'm porting a C library (raylib) to C3 (with automated scripts/tools),

There is a function pointer typedef that uses va_list as an argument type, here's the definition for reference:

typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args);

Is there anything in C3 similar to va_list?

Cheers

No, I decided not to support va_list because it's such a complex part of the C ABI that I didn't want to tie C3 to.

Yes, the System V ABI for x86-64 is kind of a pain,
I ended up removing the functions that use it from the exposed API.

The va_list can be implemented along with the va_* macros, but I understand the decision.

I'm closing the issue, if needed, a new issue shall be opened to track any further progress.

Cheers

If this turns out to be a major thing people want and need, I'll reconsider this, but calls with va_list tend to be few.