Closed Lenheart357 closed 6 months ago
I doubt there is any safe way to do this. You will have to use dark magic to create a va_list dynamically in a manner compliant with your compiler and compiler options. It is better if you redesign your system this way
//void vafunc(fmt, ...) //delete this struct vathing { enum typeofthing; void ptrtothing; vathing nextthing; } void vafunc_real(fmt, vathing* things) { //do the work void vafunc(fmt, ...) { //create vathing list, call vafunc_real SQInteger CallFunc(HSQUIRRELVM v) { //create vathing list using squirrel apis to check stack, call vafunc_real
(consider making a function shared between vafunc and CallFunc to parse the fmt string)
Please say this is possible. If not.. maybe the dark magic is like this... https://bbs.archlinux.org/viewtopic.php?id=31087
i did it , thanks for your advice
This Is Squirrel Function
testfunc(1,2,3,4);
This Is C Function static SQInteger CallFunc(HSQUIRRELVM v) { // i want get my vargv
}