search for: go_ret_error

Displaying 7 results from an estimated 7 matches for "go_ret_error".

Did you mean: do_iret_error
2020 Mar 17
0
[PATCH libnbd v2 3/3] golang: Add straightforward bindings, without callbacks.
...ing -> "*string" + | RErr -> "int" (* always 0 *) + | RFd -> "int/*XXX*/" + | RInt -> "int" + | RInt64 -> "int64" + | RCookie -> "int64" + | RString -> "*string" + | RUInt -> "uint" + +let go_ret_error = function + | RBool -> "false" + | RStaticString -> "nil" + | RErr -> "0" + | RFd -> "0/*XXX*/" + | RInt -> "0" + | RInt64 -> "0" + | RCookie -> "0" + | RString -> "nil" + | RUInt ->...
2020 Sep 06
0
[libnbd PATCH 1/3] generator: Introduce REnum/RFlags return types
...stency, but the error is - * always nil. + * always nil unless h is closed *) | RUInt -> Some "uint" + | REnum (_) -> Some "uint" (* XXX return typed constant instead? *) + | RFlags (_) -> Some "uint" (* XXX return typed constant instead? *) let go_ret_error = function | RErr -> None @@ -109,6 +112,8 @@ let go_ret_error = function | RCookie -> Some "0" | RString -> Some "nil" | RUInt -> Some "0" + | REnum (_) -> Some "0" + | RFlags (_) -> Some "0" let go_ret_c_errcode =...
2020 Sep 06
0
[libnbd PATCH 2/3] golang: Typesafe returns for REnum/RFlags
...REnum (_) -> Some "uint" (* XXX return typed constant instead? *) - | RFlags (_) -> Some "uint" (* XXX return typed constant instead? *) + | REnum ({ enum_prefix}) -> Some (camel_case enum_prefix) + | RFlags ({ flag_prefix}) -> Some (camel_case flag_prefix) let go_ret_error = function | RErr -> None @@ -393,10 +393,10 @@ let print_binding (name, { args; optargs; ret; shortdesc }) = pr " return &r, nil\n" | RUInt -> pr " return uint (ret), nil\n" - | REnum (_) -> - pr " return uint (ret), nil\n&...
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
Natural fallout after my recent testsuite additions that fixed a couple of ocaml bugs in the setters. However, on at least the OCaml code, I'm not sure what we should do if a newer libnbd ever returns a bit that an older NBD.mli was not expecting at the time the OCaml compiler ran (see below). I'm also not sure if there is a more efficient way to avoid outputting Val_FOO() converters for
2020 Mar 17
5
[PATCH libnbd v2 0/3] Unfinished golang bindings.
These bindings get as far as running very simple connections. However there are many missing parts still: * No callbacks. * No functions which handle buffers (pread/pwrite!) This is posted just for general early interest, not even for review. Rich.
2020 Mar 24
1
[PATCH libnbd v3] Add Go language bindings (golang) (RHBZ#1814538).
This feature is roughly finished now, although it needs a few more tests and some examples. It's pretty much up to par with all the other bindings, but it lacks a completely safe AIO buffer. It won't stop you from freeing the buffer too early) because golang's GC inexplicably lacks a way to declare a root from C. I can probably do it with a global variable and ref counting on the
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test. File descriptors are passed in and out as plain ints (instead of *os.File) for a couple of reasons: (1) We have to pass the plain int to syscall.Select. (2) Turning an fd into an os.File causes golang to set the blocking flag which is deeply unhelpful. Rich.