search for: c_uint

Displaying 8 results from an estimated 8 matches for "c_uint".

Did you mean: c_int
2019 Jul 07
2
[libnbd PATCH] RFC: Add bindings for Rust language
...r,\n" n + | StringList n -> pri (); pr "%s: *mut *mut c_char,\n" n + | SockAddrAndLen (n, len) -> + pri (); pr "%s: *const libc::sockaddr,\n" n; + pri (); pr "%s: libc::socklen_t,\n" len + | UInt n -> pri (); pr "%s: c_uint,\n" n + | UInt32 n -> pri (); pr "%s: u32,\n" n + | UInt64 n -> pri (); pr "%s: u64,\n" n + ); + ) args; + pr_indent (indent - 1); pr ")" + +let print_rust_arg_list ?(handle = false) indent args = + let pri () = pr_indent indent in + let...
2019 Aug 31
1
[PATCH libnbd] Add bindings for Rust language
Still not working, but I took the latest patch and: - rebased it against libnbd 1.0 - fixed it so it handles new args and cbargs The generator now runs without warnings. This patch doesn't handle optargs at all. In C these are converted to non-optional parameter. Rust doesn't (AFAIK) have optional or labelled arguments unfortunately. Rich.
2019 Jul 08
0
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...en in sync. I also didn't understand what this means. It's a matter of personal preference but you can use multi-line string constants in OCaml which can be unlimited in length, so this: > + pr "#[allow(unused_imports)]\n"; > + pr "use std::os::raw::{c_char, c_int, c_uint, c_void};\n"; > + pr "use std::os::unix::io::RawFd;\n"; > + pr "use std::ffi::CStr;\n"; > + pr "use libnbd_sys::*;\n"; > + pr "use libc;\n"; > + pr "\n"; (etc) can be written as: pr "\ #[allow(unused_imports)] use s...
2019 Jul 08
2
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...'t understand what this means. > >It's a matter of personal preference but you can use multi-line string >constants in OCaml which can be unlimited in length, so this: > >> + pr "#[allow(unused_imports)]\n"; >> + pr "use std::os::raw::{c_char, c_int, c_uint, c_void};\n"; >> + pr "use std::os::unix::io::RawFd;\n"; >> + pr "use std::ffi::CStr;\n"; >> + pr "use libnbd_sys::*;\n"; >> + pr "use libc;\n"; >> + pr "\n"; >(etc) > >can be written as: > > p...
2019 Jul 08
1
Re: [libnbd PATCH] RFC: Add bindings for Rust language
...gs" (above) and "substrings" means in >this context. Do you mean actual string constants? > No, I mean the strings printed by the generator, e.g. the one from your example on how to use a multiline one: pr "\ #[allow(unused_imports)] use std::os::raw::{c_char, c_int, c_uint, c_void}; use std::os::unix::io::RawFd; [...] "; >Rich. > >-- >Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones >Read my programming and virtualization blog: http://rwmj.wordpress.com >virt-top is 'top' for virtual machines. Tiny progra...
2018 Apr 26
2
windows ABI problem with i128?
...===================== However I think this results in a different ABI than LLVM will use when you do i128 division. For example, here is my test case (in zig code): ================================================================= pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) noreturn; export fn WinMainCRTStartup() noreturn { @setAlignStack(16); @setRuntimeSafety(false); var a: u128 = 152313999999999991610955792383; var b: u128 = 10000000000000000000; var c = a / b; // this generates a call to __udivti3 if (c != b) { @breakpoint();...
2018 Apr 26
0
windows ABI problem with i128?
...t; However I think this results in a different ABI than LLVM will use when you > do i128 division. For example, here is my test case (in zig code): > ================================================================= > > pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) noreturn; > > export fn WinMainCRTStartup() noreturn { > @setAlignStack(16); > @setRuntimeSafety(false); > > var a: u128 = 152313999999999991610955792383; > var b: u128 = 10000000000000000000; > var c = a / b; // this generates a call to __udivti3 > &...
2018 Apr 26
1
windows ABI problem with i128?
...esults in a different ABI than LLVM will use when > you > > do i128 division. For example, here is my test case (in zig code): > > ================================================================= > > > > pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) > noreturn; > > > > export fn WinMainCRTStartup() noreturn { > > @setAlignStack(16); > > @setRuntimeSafety(false); > > > > var a: u128 = 152313999999999991610955792383; > > var b: u128 = 10000000000000000000; > > var c = a / b;...