mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: Add visibility to action struct
The visibility field in action replaces in_fish, in_docs and internal. The defined types are: VPublic: A public API. This is exported and documented in all language bindings, and in guestfish. VStateTest: A public API which queries the library state machine. It is exported and documented in all language bindings, but not guestfish. VBindTest: An internal API used only for testing language bindings. It is guarded by GUESTFS_PRIVATE in the C api, but exported by all other language bindings as it is required for testing. If language bindings offer any way to guard use of these apis, that mechanism should be used. It is not documented anywhere. VDebug: A debugging API. It is exported by all language bindings, and in guestfish, but is not documented anywhere. VInternal: An internal-only API. It is guarded by GUESTFS_PRIVATE in the C api, and not exported at all in any other language binding. It is not documented anywhere.
This commit is contained in:
@@ -107,7 +107,7 @@ static void free_strings (char **r);
|
||||
| typ, (RStructListOnly | RStructAndList) ->
|
||||
pr "static void push_%s (lua_State *L, struct guestfs_%s *v);\n" typ typ;
|
||||
pr "static void push_%s_list (lua_State *L, struct guestfs_%s_list *v);\n" typ typ
|
||||
) (rstructs_used_by all_functions);
|
||||
) (rstructs_used_by external_functions);
|
||||
|
||||
pr "\
|
||||
|
||||
@@ -626,7 +626,7 @@ guestfs_lua_delete_event_callback (lua_State *L)
|
||||
pr " return 1;\n";
|
||||
pr "}\n";
|
||||
pr "\n"
|
||||
) all_functions_sorted;
|
||||
) external_functions_sorted;
|
||||
|
||||
pr "\
|
||||
static struct userdata *
|
||||
@@ -863,7 +863,7 @@ push_event (lua_State *L, uint64_t event)
|
||||
| typ, (RStructListOnly | RStructAndList) ->
|
||||
generate_push_struct typ;
|
||||
generate_push_struct_list typ
|
||||
) (rstructs_used_by all_functions);
|
||||
) (rstructs_used_by external_functions);
|
||||
|
||||
pr "\
|
||||
void
|
||||
@@ -901,7 +901,7 @@ static luaL_Reg methods[] = {
|
||||
|
||||
List.iter (
|
||||
fun { name = name } -> pr " { \"%s\", guestfs_lua_%s },\n" name name
|
||||
) all_functions_sorted;
|
||||
) external_functions_sorted;
|
||||
|
||||
pr "\
|
||||
|
||||
|
||||
Reference in New Issue
Block a user