mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: add VPublicNoFish visibility type
Usable to have public functions, i.e. like VPublic, but do not showing them in guestfish.
This commit is contained in:
committed by
Richard W.M. Jones
parent
db055262d4
commit
8aadde50b3
@@ -12744,19 +12744,19 @@ let non_daemon_functions, daemon_functions =
|
||||
let all_functions = non_daemon_functions @ daemon_functions
|
||||
|
||||
let is_external { visibility = v } = match v with
|
||||
| VPublic | VStateTest | VBindTest | VDebug -> true
|
||||
| VPublic | VPublicNoFish | VStateTest | VBindTest | VDebug -> true
|
||||
| VInternal -> false
|
||||
|
||||
let is_internal f = not (is_external f)
|
||||
|
||||
let is_documented { visibility = v } = match v with
|
||||
| VPublic | VStateTest -> true
|
||||
| VPublic | VPublicNoFish | VStateTest -> true
|
||||
| VBindTest | VDebug | VInternal -> false
|
||||
|
||||
let is_fish { visibility = v; style = (_, args, _) } =
|
||||
(* Internal functions are not exported to guestfish. *)
|
||||
match v with
|
||||
| VStateTest | VBindTest | VInternal -> false
|
||||
| VPublicNoFish | VStateTest | VBindTest | VInternal -> false
|
||||
| VPublic | VDebug ->
|
||||
(* Functions that take Pointer parameters cannot be used in
|
||||
* guestfish, since there is no way the user could safely
|
||||
|
||||
@@ -45,7 +45,7 @@ let hash_matches h { name = name } =
|
||||
type optarg_proto = Dots | VA | Argv
|
||||
|
||||
let is_public { visibility = v } = match v with
|
||||
| VPublic | VStateTest | VDebug -> true
|
||||
| VPublic | VPublicNoFish | VStateTest | VDebug -> true
|
||||
| VBindTest | VInternal -> false
|
||||
|
||||
let is_private f = not (is_public f)
|
||||
|
||||
@@ -322,6 +322,8 @@ and cmd = string list
|
||||
|
||||
type visibility =
|
||||
| VPublic (* Part of the public API *)
|
||||
| VPublicNoFish (* Like VPublic, but not exported in
|
||||
guestfish *)
|
||||
| VStateTest (* A function which tests the state
|
||||
of the appliance *)
|
||||
| VBindTest (* Only used for testing language bindings *)
|
||||
|
||||
Reference in New Issue
Block a user