mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
535a2363bb
In testing variable fw/precision in PR_Sprintf, I got a nasty reminder of the limitations of the current progs ABI: passing @args to another QC function does not work because the args list gets trampled but the called function's locals. Thus, the need for a va_copy. It's not quite the same as C's as it returns the destination args instead of copying like memcpy, but it does copy the list from the source args to a temporary buffer that is freed when the calling function returns.
3 lines
59 B
R
3 lines
59 B
R
#include <runtime.h>
|
|
|
|
@va_list va_copy(@va_list src) = #0;
|