search for: s_i64

Displaying 20 results from an estimated 26 matches for "s_i64".

2019 Aug 10
0
[PATCH libnbd 6/9] generator: Add non-optional Flags type.
...cbname | Enum (n, _) -> pr " int %s;\n" n + | Flags (n, _) -> + pr " uint32_t %s_u32;\n" n; + pr " unsigned int %s; /* really uint32_t */\n" n | Int n -> pr " int %s;\n" n | Int64 n -> pr " int64_t %s_i64;\n" n; @@ -4298,6 +4308,7 @@ let print_python_binding name { args; optargs; ret; may_set_error } = | BytesPersistOut (_, count) -> pr " \"O\"" | Closure _ -> pr " \"O\"" | Enum _ -> pr " \"i\"" + | Flags _ -...
2019 Oct 04
0
[PATCH libnbd 3/4] api: Add nbd_connect_socket.
...or } = | Flags (n, _) -> pr " uint32_t %s_u32;\n" n; pr " unsigned int %s; /* really uint32_t */\n" n - | Int n -> pr " int %s;\n" n + | Fd n | Int n -> pr " int %s;\n" n | Int64 n -> pr " int64_t %s_i64;\n" n; pr " long long %s; /* really int64_t */\n" n @@ -4940,7 +4978,7 @@ let print_python_binding name { args; optargs; ret; may_set_error } = | Closure _ -> pr " \"O\"" | Enum _ -> pr " \"i\"" | Flags _ -> pr...
2019 Aug 10
0
[PATCH libnbd 3/9] generator: Add Enum type for enumerated types / unions.
...pr " struct py_aio_buffer *%s_buf;\n" n | Closure { cbname } -> pr " PyObject *%s_user_data;\n" cbname + | Enum (n, _) -> pr " int %s;\n" n | Int n -> pr " int %s;\n" n | Int64 n -> pr " int64_t %s_i64;\n" n; @@ -4248,6 +4280,7 @@ let print_python_binding name { args; optargs; ret; may_set_error } = | BytesOut (_, count) -> pr " \"n\"" | BytesPersistOut (_, count) -> pr " \"O\"" | Closure _ -> pr " \"O\"" +...
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...pr " struct %s_%s_data callback_data;\n" name n + | Flags n -> + pr " uint32_t %s_u32;\n" n; + pr " unsigned int %s = 0; /* really uint32_t */\n" n | Int n -> pr " int %s;\n" n | Int64 n -> pr " int64_t %s_i64;\n" n; @@ -3091,6 +3112,7 @@ let print_python_binding name { args; ret } = | BytesOut (_, count) -> pr " \"n\"" | BytesPersistOut (_, count) -> pr " \"O\"" | Callback (n, _) -> pr " \"O\"" + | Flags n ->...
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2019 Jun 18
0
[libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...5 &%s" n | Path n -> pr ", PyUnicode_FSConverter, &%s" n | SockAddrAndLen (n, _) -> pr ", &%s" n | String n -> pr ", &%s" n @@ -3634,6 +3655,7 @@ let print_python_binding name { args; ret } = | Int64 n -> pr " %s_i64 = %s;\n" n n | Opaque n -> () | Path _ -> () + | ReadStatus n -> pr " XXX6 %s\n" n | SockAddrAndLen _ -> pr " abort (); /* XXX SockAddrAndLen not implemented */\n"; | String _ -> () @@ -3662,6 +3684,7 @@ let print_python_bindin...
2019 Jun 25
3
[PATCH libnbd] generator: Add Mutable type to the generator.
..._ | Int64 _ | Mutable _ + | Path _ | SockAddrAndLen _ | StringList _ | UInt _ | UInt32 _ -> assert false ) args; pr " return ret;\n"; @@ -3388,6 +3411,8 @@ let print_python_binding name { args; ret } = | Int64 n -> pr " int64_t %s_i64;\n" n; pr " long long %s; /* really int64_t */\n" n + | Mutable arg -> + pr " PyObject *%s;\n" (List.hd (name_of_arg arg)) | Opaque _ -> () | Path n -> pr " char *%s = NULL;\n" n | SockAddrAndLen (n, _) -> @@ -3429,6...
2019 Jun 20
1
Re: [libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...| Path n -> pr ", PyUnicode_FSConverter, &%s" n > | SockAddrAndLen (n, _) -> pr ", &%s" n > | String n -> pr ", &%s" n > @@ -3634,6 +3655,7 @@ let print_python_binding name { args; ret } = > | Int64 n -> pr " %s_i64 = %s;\n" n n > | Opaque n -> () > | Path _ -> () > + | ReadStatus n -> pr " XXX6 %s\n" n > | SockAddrAndLen _ -> > pr " abort (); /* XXX SockAddrAndLen not implemented */\n"; > | String _ -> () > @@ -3662,6...
2019 Oct 04
4
[PATCH libnbd 1/4] generator: Allow long ‘name - shortdesc’ in man pages.
For commands with long names and/or short descriptors, you can end up going over 72 characters in the first line of the man page (causing podwrapper to complain). Wrap these lines. --- generator/generator | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/generator b/generator/generator index 7d3f656..ad1cb6b 100755 --- a/generator/generator +++ b/generator/generator
2019 Aug 09
0
[PATCH libnbd 1/2] generator: Handle closure args (cbargs) specially.
...t; len; - | ArrayAndLen _ -> assert false | Bool n -> pr " int %s;\n" n | BytesIn (n, _) -> pr " Py_buffer %s;\n" n @@ -4169,7 +4164,6 @@ let print_python_binding name { args; ret; may_set_error } = | Int64 n -> pr " int64_t %s_i64;\n" n; pr " long long %s; /* really int64_t */\n" n - | Mutable arg -> assert false | Path n -> pr " PyObject *py_%s = NULL;\n" n; pr " char *%s = NULL;\n" n @@ -4196,7 +4190,6 @@ let print_python_binding name { args; ret;...
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator. Enum maps to enumerated types (like enum in C). The only current use for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural equivalents in other programming languages). Flags maps to any uint32_t bitmask. It is basically a non-optional, generalized
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably make much sense on their own, but they are preparatory to better handling of enums, and or'd lists of flags. Rich.
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...} -> pr " PyObject *%s_user_data;\n" cbname - | Flags n -> - pr " uint32_t %s_u32;\n" n; - pr " unsigned int %s; /* really uint32_t */\n" n | Int n -> pr " int %s;\n" n | Int64 n -> pr " int64_t %s_i64;\n" n; @@ -4184,6 +4203,12 @@ let print_python_binding name { args; ret; may_set_error } = pr " uint64_t %s_u64;\n" n; pr " unsigned long long %s; /* really uint64_t */\n" n ) args; + List.iter ( + function + | OFlags n -> + pr " u...
2019 Jul 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD. Rich.
2020 Sep 29
2
[PATCH libnbd] generator: Add SizeT type, maps to C size_t.
...| SockAddrAndLen _ -> pr " abort (); /* XXX SockAddrAndLen not implemented */\n"; | String _ -> () @@ -462,6 +465,7 @@ let print_python_binding name { args; optargs; ret; may_set_error } = | Fd n | Int n -> pr ", %s" n | Int64 n -> pr ", %s_i64" n | Path n -> pr ", %s" n + | SizeT n -> pr ", (size_t)%s" n | SockAddrAndLen (n, _) -> pr ", /* XXX */ (void *) %s, 0" n | String n -> pr ", %s" n | StringList n -> pr ", %s" n @@ -510,6 +514,7 @@ let pri...
2019 Jul 16
0
[libnbd PATCH 2/2] RFC: generator: Handle shared callbacks in Python
...; - pr " \"callback parameter %s is not callable\");\n" - n; - pr " return NULL;\n"; - pr " }\n" | Flags n -> pr " %s_u32 = %s;\n" n n | Int _ -> () | Int64 n -> pr " %s_i64 = %s;\n" n n | Mutable _ -> pr " abort (); /* Mutable for normal Python parameters not impl */\n" - | Opaque n -> () + | OpaqueAndCallbacks (n, cbs) | OpaqueAndCallbacksPersist (n, cbs) -> + List.iter (fun cb -> + pr " if (!PyCallab...
2019 Jul 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...gt; + pr " struct %s_user_data *user_data;\n" name | Flags n -> pr " uint32_t %s_u32;\n" n; pr " unsigned int %s; /* really uint32_t */\n" n @@ -3911,8 +3930,7 @@ let print_python_binding name { args; ret } = pr " int64_t %s_i64;\n" n; pr " long long %s; /* really int64_t */\n" n | Mutable arg -> - pr " PyObject *%s;\n" (List.hd (name_of_arg arg)) - | Opaque _ -> () + pr " PyObject *%s;\n" (List.hd (c_name_of_arg arg)) | Path n -> pr &q...
2019 Jul 16
3
[RFC libnbd PATCH 0/2] Start fixing python nbd.pread_structured_callback
Posting now that I got something to compile (at the expense of breaking OCaml bindings), but I'm open to ideas on how to improve it. Eric Blake (2): generator: Tweak print_c_arg_list to take alternate first arg RFC: generator: Handle shared callbacks in Python generator/generator | 556 ++++++++++++++++++++++---------------------- 1 file changed, 280 insertions(+), 276 deletions(-) --
2019 Jul 16
1
[libnbd PATCH] generator: Prefer closure opaque after function pointer in C
...a"; List.iter ( fun { cbname } -> pr ", %s_%s_wrapper" name cbname - ) cls + ) cls; + pr ", user_data" | Flags n -> pr ", %s_u32" n | Int n -> pr ", %s" n | Int64 n -> pr ", %s_i64" n @@ -4195,7 +4196,7 @@ let print_python_binding name { args; ret } = | Closure (false, _) -> () | Closure (true, _) -> pr " /* This ensures the callback data is freed eventually. */\n"; - pr " nbd_add_close_callback (h, user_data, free_%s_user_d...
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
..."; + pr " \"callback parameter %s is not callable\");\n" cbname; + pr " return NULL;\n"; + pr " }\n" | Flags n -> pr " %s_u32 = %s;\n" n n | Int _ -> () | Int64 n -> pr " %s_i64 = %s;\n" n n @@ -4175,12 +4122,9 @@ let print_python_binding name { args; ret } = | BytesOut (n, count) -> pr ", %s, %s" n count | BytesPersistIn (n, _) | BytesPersistOut (n, _) -> pr ", %s_buf->data, %s_buf->len" n n - | Closure (_, cls) ->...