1
Fork 0

Implement variadic function calling

This commit is contained in:
bjorn3 2019-02-11 19:18:52 +01:00
parent 4bb8bfca94
commit c68e76c33b
5 changed files with 26 additions and 6 deletions

View file

@ -121,6 +121,8 @@ fn main() {
//return;
unsafe {
printf("Hello %s\n\0" as *const str as *const char, "printf\0" as *const str as *const char);
let hello: &[u8] = b"Hello\0" as &[u8; 6];
let ptr: *const u8 = hello as *const [u8] as *const u8;
puts(ptr);