Implement variadic function calling
This commit is contained in:
parent
4bb8bfca94
commit
c68e76c33b
5 changed files with 26 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue