From: Tage Johansson <frans.t...@gmail.com>

---
 generator/GoLang.ml | 11 -----------
 generator/utils.ml  |  8 ++++++++
 generator/utils.mli |  3 +++
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/generator/GoLang.ml b/generator/GoLang.ml
index 4ab6b26..50ed722 100644
--- a/generator/GoLang.ml
+++ b/generator/GoLang.ml
@@ -30,17 +30,6 @@ open Printf
 open API
 open Utils
 
-(* Convert C function name to camel-case name.
- * Regular but somewhat hit and miss.
- *)
-let camel_case name =
-  let xs = nsplit "_" name in
-  List.fold_left (
-    fun a x ->
-      a ^ String.uppercase_ascii (Str.first_chars x 1) ^
-          String.lowercase_ascii (Str.string_after x 1)
-  ) "" xs
-
 let go_name_of_arg = function
   | Bool n -> n
   | BytesIn (n, len) -> n
diff --git a/generator/utils.ml b/generator/utils.ml
index 6d77e51..3a96929 100644
--- a/generator/utils.ml
+++ b/generator/utils.ml
@@ -500,3 +500,11 @@ let pod2text longdesc =
     Hashtbl.add cache key lines;
     save_cache ();
     lines
+
+let camel_case name =
+  let xs = nsplit "_" name in
+  List.fold_left (
+    fun a x ->
+      a ^ String.uppercase_ascii (Str.first_chars x 1) ^
+          String.lowercase_ascii (Str.string_after x 1)
+  ) "" xs
diff --git a/generator/utils.mli b/generator/utils.mli
index e622e31..b4a2525 100644
--- a/generator/utils.mli
+++ b/generator/utils.mli
@@ -65,3 +65,6 @@ val line_directive_of_location : location -> string
 type cache_key = string
 type cache_value = string list
 val pod2text : cache_key -> cache_value
+
+(* Convert C function name to upper-camel-case name. *)
+val camel_case : string -> string
-- 
2.41.0

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to