Displaying 5 results from an estimated 5 matches for "name_upp".
Did you mean:
name_up
2019 Jun 03
1
[libnbd PATCH] generator: Add #define witnesses for all API
...)
diff --git a/generator/generator b/generator/generator
index db7c10f..7d0ea3f 100755
--- a/generator/generator
+++ b/generator/generator
@@ -2712,6 +2712,12 @@ let print_extern name args ret =
print_call name args ret;
pr ";\n"
+let print_extern_and_define name args ret =
+ let name_upper = String.uppercase_ascii name in
+ print_extern name args ret;
+ pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper;
+ pr "\n"
+
let generate_include_libnbd_h () =
generate_header CStyle;
@@ -2729,14 +2735,23 @@ let generate_include_libnbd_h () =
List.iter (fun (n, i) -...
2019 Jun 27
3
[libnbd PATCH] generator: Add support for namespace constants
...ot;STATE_HOLE", 1 lsl 0;
+ "STATE_ZERO", 1 lsl 1;
+ ] ];
+]
+
(*----------------------------------------------------------------------*)
(* Helper functions. *)
@@ -2908,6 +2915,25 @@ let print_extern_and_define name args ret =
pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper;
pr "\n"
+let print_ns_ctxt ns ns_upper ctxt consts =
+ let ctxt_upper = String.uppercase_ascii ctxt in
+ pr "#define LIBNBD_CONTEXT_%s_%s \"%s:%s\"\n"
+ ns_upper ctxt_upper ns ctxt;
+ pr "\n";
+ pr "/* \"%s:%s\" context related c...
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...rgs ret;
pr ";\n"
let print_cbarg_list ?(valid_flag = true) ?(types = true) cbargs =
@@ -3444,9 +3458,9 @@ let print_closure_typedefs () =
) unique_cls;
pr "\n"
-let print_extern_and_define name args ret =
+let print_extern_and_define name args optargs ret =
let name_upper = String.uppercase_ascii name in
- print_extern name args ret;
+ print_extern name args optargs ret;
pr "#define LIBNBD_HAVE_NBD_%s 1\n" name_upper;
pr "\n"
@@ -3511,7 +3525,8 @@ let generate_include_libnbd_h () =
pr "\n";
print_closure_typedefs ();...
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...cls in
+ List.iter (
+ fun { cbname; cbargs } ->
+ pr "typedef int (*nbd_%s_callback) " cbname;
+ print_arg_list ~valid_flag:true ~user_data:true cbargs;
+ pr ";\n";
+ ) unique_cls;
+ pr "\n"
+
let print_extern_and_define name args ret =
let name_upper = String.uppercase_ascii name in
print_extern name args ret;
@@ -3355,6 +3413,7 @@ let generate_include_libnbd_h () =
pr "extern int nbd_get_errno (void);\n";
pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n";
pr "\n";
+ print_closure_typedefs ();
List.iter...
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.