mirror of
https://github.com/clockworkpi/Menu.git
synced 2026-03-26 22:03:02 +01:00
first commit
This commit is contained in:
23
60_Utils/02_Bean/beans/runtime/arg.bean
Executable file
23
60_Utils/02_Bean/beans/runtime/arg.bean
Executable file
@@ -0,0 +1,23 @@
|
||||
|
||||
inline va_size(x& void) uint32 {
|
||||
using size. uint32 = .x - 8;
|
||||
func = .size;
|
||||
}
|
||||
|
||||
inline va_start(x& void) void {
|
||||
using size. uint32 = .x - 8;
|
||||
func = .x - (.size + 8);
|
||||
}
|
||||
|
||||
inline va_next<T>(ap& void) {
|
||||
ap += ((sizeof(T) + (sizeof(word) - 1)) /
|
||||
sizeof(word) * sizeof(word));
|
||||
}
|
||||
|
||||
inline va_nexts<T>(ap& void, size& uint32) {
|
||||
define {
|
||||
x = ((sizeof(T) + (sizeof(word) - 1)) /
|
||||
sizeof(word) * sizeof(word));
|
||||
}
|
||||
ap += x, size -= x;
|
||||
}
|
||||
Reference in New Issue
Block a user