Remove deprecated GObject bindings

These were marked as deprecated in a57f6b8e2. Time to remove them

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson
2026-02-10 12:50:32 -05:00
parent eed58cc443
commit 955ea8882b
28 changed files with 11 additions and 2329 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +0,0 @@
(* libguestfs
* Copyright (C) 2009-2025 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*)
val generate_gobject_header : unit -> unit
val generate_gobject_makefile : unit -> unit
val generate_gobject_optargs_header : string -> string -> Types.action -> unit -> unit
val generate_gobject_optargs_source : string -> string -> Types.optargt list -> Types.action -> unit -> unit
val generate_gobject_session_header : unit -> unit
val generate_gobject_session_source : unit -> unit
val generate_gobject_struct_header : string -> string -> (string * Types.field) list -> unit -> unit
val generate_gobject_struct_source : string -> string -> unit -> unit
val generate_gobject_tristate_header : unit -> unit
val generate_gobject_tristate_source : unit -> unit

View File

@@ -73,8 +73,6 @@ sources = \
fish.mli \
fish_commands.ml \
fish_commands.mli \
GObject.ml \
GObject.mli \
golang.ml \
golang.mli \
haskell.ml \
@@ -164,7 +162,6 @@ objects = \
php.cmo \
erlang.cmo \
lua.cmo \
GObject.cmo \
golang.cmo \
rust.cmo \
bindtests.cmo \
@@ -209,9 +206,6 @@ stamp-generator: generator
mkdir -p $(top_srcdir)/ruby/ext/guestfs
mkdir -p $(top_srcdir)/java/com/redhat/et/libguestfs
mkdir -p $(top_srcdir)/csharp
mkdir -p $(top_srcdir)/gobject/src
mkdir -p $(top_srcdir)/gobject/include
mkdir -p $(top_srcdir)/gobject/include/guestfs-gobject
cd $(top_srcdir) && $(abs_builddir)/generator
touch $@

View File

@@ -639,66 +639,6 @@ main = do
pr " putStrLn \"EOF\"\n"
and generate_gobject_js_bindtests () =
generate_header CPlusPlusStyle GPLv2plus;
pr {|const Guestfs = imports.gi.Guestfs;
var g = new Guestfs.Session();
var o;
|};
let mkoptargs = function
| Some optargs ->
"o = new Guestfs.InternalTest({" ^
(
String.concat ", " (
List.map (
function
| CallOBool (n, v) -> n ^ ": " ^ (if v then "true" else "false")
| CallOInt (n, v) -> n ^ ": " ^ (string_of_int v)
| CallOInt64 (n, v) -> n ^ ": " ^ Int64.to_string v
| CallOString (n, v) -> n ^ ": \"" ^ v ^ "\""
| CallOStringList (n, xs) -> "" (* not implemented XXX *)
(*
| CallOStringList (n, xs) ->
n ^ ": " ^
"[" ^ String.concat "," (List.map (sprintf "\"%s\"") xs) ^ "]"
*)
) optargs
)
) ^
"});"
| None ->
"o = null;"
in
let mkargs args =
String.concat ", " (
(List.map (
function
| CallString s -> "\"" ^ s ^ "\""
| CallOptString None -> "null"
| CallOptString (Some s) -> "\"" ^ s ^ "\""
| CallStringList xs ->
"[" ^ String.concat "," (List.map (sprintf "\"%s\"") xs) ^ "]"
| CallInt i -> string_of_int i
| CallInt64 i -> Int64.to_string i
| CallBool true -> "true"
| CallBool false -> "false"
| CallBuffer s -> "\"" ^ c_quote s ^ "\""
) args)
@ ["o"; "null"]
)
in
generate_lang_bindtests (
fun f args optargs ->
pr "%s\ng.%s(%s);\n" (mkoptargs optargs) f (mkargs args)
);
pr "\nprint(\"EOF\");\n"
and generate_erlang_bindtests () =
pr "#!/usr/bin/env escript\n";
pr "%%! -smp enable -sname create_disk debug verbose\n";

View File

@@ -19,7 +19,6 @@
val generate_bindtests : unit -> unit
val generate_erlang_bindtests : unit -> unit
val generate_golang_bindtests : unit -> unit
val generate_gobject_js_bindtests : unit -> unit
val generate_haskell_bindtests : unit -> unit
val generate_java_bindtests : unit -> unit
val generate_lua_bindtests : unit -> unit

View File

@@ -302,49 +302,6 @@ Run it from the top source directory using the command
output_to "golang/bindtests/bindtests.go"
Bindtests.generate_golang_bindtests;
output_to "gobject/bindtests.js"
Bindtests.generate_gobject_js_bindtests;
output_to "gobject/Makefile.inc"
GObject.generate_gobject_makefile;
output_to "gobject/include/guestfs-gobject.h"
GObject.generate_gobject_header;
List.iter (
fun { s_name = typ; s_cols = cols } ->
let short = sprintf "struct-%s" typ in
let filename =
sprintf "gobject/include/guestfs-gobject/%s.h" short in
output_to filename
(GObject.generate_gobject_struct_header short typ cols);
let filename = sprintf "gobject/src/%s.c" short in
output_to filename
(GObject.generate_gobject_struct_source short typ)
) external_structs;
delete_except_generated "gobject/include/guestfs-gobject/struct-*.h";
delete_except_generated "gobject/src/struct-*.c";
List.iter (
function
| ({ name; style = (_, _, (_::_ as optargs)) } as f) ->
let short = sprintf "optargs-%s" name in
let filename =
sprintf "gobject/include/guestfs-gobject/%s.h" short in
output_to filename
(GObject.generate_gobject_optargs_header short name f);
let filename = sprintf "gobject/src/%s.c" short in
output_to filename
(GObject.generate_gobject_optargs_source short name optargs f)
| { style = _, _, [] } -> ()
) (actions |> external_functions |> sort);
delete_except_generated "gobject/include/guestfs-gobject/optargs-*.h";
delete_except_generated "gobject/src/optargs-*.c";
output_to "gobject/include/guestfs-gobject/tristate.h"
GObject.generate_gobject_tristate_header;
output_to "gobject/src/tristate.c"
GObject.generate_gobject_tristate_source;
output_to "gobject/include/guestfs-gobject/session.h"
GObject.generate_gobject_session_header;
output_to "gobject/src/session.c"
GObject.generate_gobject_session_source;
(* mlcustomize may not be shipped in this source. *)
if is_regular_file "common/mlcustomize/Makefile.am" then (
output_to "common/mlcustomize/customize_cmdline.mli"