search for: delete_event_callback

Displaying 20 results from an estimated 20 matches for "delete_event_callback".

2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
...0,30 @@ end class guestfs : ?environment:bool -> ?close_on_exit:bool -> unit -> object method close : unit -> unit + (** See {!Guestfs.close} *) method set_event_callback : event_callback -> event list -> event_handle + (** See {!Guestfs.set_event_callback} *) method delete_event_callback : event_handle -> unit + (** See {!Guestfs.delete_event_callback} *) method last_errno : unit -> int + (** See {!Guestfs.last_errno} *) method ocaml_handle : t + (** Return the {!Guestfs.t} handle *) "; List.iter ( - fun { name = name; style = style; non_c_aliases = non...
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
..._ => print!("o"), + }, + &EVENT_ALL, + ) + .unwrap(); + let eh = g + .set_event_callback(|_, _, _, _| print!("n"), &EVENT_ALL) + .unwrap(); + g.set_trace(true).unwrap(); + g.delete_event_callback(eh).unwrap(); + g.set_trace(false).unwrap(); + } + let _v = vec![0; 1024 * 1024]; + // no leak + // mem::forget(v); + println!() +} diff --git a/rust/src/bin/event_leak.rs b/rust/src/bin/event_leak.rs new file mode 100644 index 000000000..176de3c9a --- /dev/null +++ b/rust/src...
2015 Sep 30
3
[PATCH 1/2] ocaml: Use ocamlfind to run ocamldoc.
Using 'ocamlfind ocamldoc' is much faster than running 'ocamldoc' directly, because ocamlfind will run the native code program 'ocamldoc.opt' if it is available. This change approximately halves the time taken to compile the ocaml bindings. --- ocaml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index
2019 Aug 05
3
Re: [PATCH] Rust bindings: Implement Event features
....unwrap(); > > + assert_eq!("ok", g.debug("progress", &["5"]).unwrap()); > > + assert!(*(&callback_invoked).lock().unwrap() > 0); > > + > > + *(&callback_invoked).lock().unwrap() = 0; > > + g.delete_event_callback(eh).unwrap(); > > + assert_eq!("ok", g.debug("progress", &["5"]).unwrap()); > > + assert_eq!(*(&callback_invoked).lock().unwrap(), 0); > > + > > + g.set_event_callback( > > + |_, _, _, _| { > >...
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
..._set_event_callback] + * {guestfs_set_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback] * to register an event callback. This returns an event handle. */ static VALUE @@ -297,7 +297,7 @@ ruby_set_event_callback (VALUE gv, VALUE cbv, VALUE event_bitmaskv) * g.delete_event_callback(event_handle) -> nil * * Call - * +guestfs_delete_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback] + * {guestfs_delete_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_delete_event_callback] * to delete an event callback. */ static VALUE @@...
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a regression test.
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
...usize, +); + +#[link(name = "guestfs")] +extern "C" { + fn guestfs_set_event_callback( + g: *const base::guestfs_h, + cb: GuestfsEventCallback, + event_bitmask: u64, + flags: i32, + opaque: *const c_void, + ) -> i32; + fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32); + fn guestfs_event_to_string(bitmask: u64) -> *const c_char; + fn free(buf: *const c_void); +} + +#[derive(Hash, PartialEq, Eq)] +pub struct EventHandle { + eh: i32, +} + +pub type Callback = FnMut(guestfs::Event, EventHandle, &[i8], &[u64]);...
2019 Jul 31
0
Re: [PATCH] Rust bindings: Implement Event features
...) > + .unwrap(); > + assert_eq!("ok", g.debug("progress", &["5"]).unwrap()); > + assert!(*(&callback_invoked).lock().unwrap() > 0); > + > + *(&callback_invoked).lock().unwrap() = 0; > + g.delete_event_callback(eh).unwrap(); > + assert_eq!("ok", g.debug("progress", &["5"]).unwrap()); > + assert_eq!(*(&callback_invoked).lock().unwrap(), 0); > + > + g.set_event_callback( > + |_, _, _, _| { > + let mut data...
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's not appropriate for language bindings, and we never intended that these internal functions be used from language bindings, that was just a historical accident. This patch series removes any external use of the safe_* functions. Rich.
2019 Apr 03
1
[PATCH] Add missing python bindings tests
...g.add_drive('/dev/null') + g.launch() + + events = guestfs.EVENT_PROGRESS + + eh = g.set_event_callback(callback, events) + g.debug('progress', ['5']) + self.assertTrue(callback_invoked > 0) + + callback_invoked = 0 + g.delete_event_callback(eh) + g.debug('progress', ['5']) + self.assertEqual(callback_invoked, 0) + + g.set_event_callback(callback, events) + g.debug('progress', ['5']) + self.assertTrue(callback_invoked > 0) + + g.close() -- 2.17.1
2015 Feb 10
3
[PATCH 1/3] generator: add a simple HTML escaping function
--- generator/utils.ml | 8 +++++++- generator/utils.mli | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/generator/utils.ml b/generator/utils.ml index b24ba8c..3a62084 100644 --- a/generator/utils.ml +++ b/generator/utils.ml @@ -360,4 +360,10 @@ let args_of_optargs optargs = | OInt64 n -> Int64 n | OString n -> String n | OStringList n ->
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2020 Jan 10
8
[PATCH 0/7] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python bindings, leaving only an overly length line in setup.py. Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (7): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests: improve variable naming python: tests:
2020 Jan 10
9
[PATCH v2 0/8] Various Python pycodestyle fixes
Fixes all the pycodestyle issues in the Python bindings, overring one that does not make sense to change (and it's in setup.py, so almost irrelevant). Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (8): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests:
2012 Dec 13
3
Lua improvements
Here are a few patches I applied to get the Lua bindings to build correctly with different versions of Lua. I am not particularly happy with generating all the test scripts just for the shebang line. Since it has been a while since I had to edit autoconf/automake, this was the best I could come up with. Cheers, -Hilko
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2017 Jul 07
2
[PATCH v2] v2v: docs: VDSM location of virt-v2v log file.
See this bug for background information: https://bugzilla.redhat.com/show_bug.cgi?id=1350465 Thanks: Tomáš Golembiovský --- v2v/virt-v2v.pod | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index e68d75cf8..0943bf305 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -1909,18 +1909,32 @@ that
2017 Jul 07
3
[PATCH] v2v: docs: VDSM location of virt-v2v log file.
See this bug for background information: https://bugzilla.redhat.com/show_bug.cgi?id=1350465 --- v2v/virt-v2v.pod | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index e68d75cf8..93d1a9ecd 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -1909,18 +1909,33 @@ that guest through the RHV-M UI,
2017 Jun 27
3
[PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
If the connection is not local, paths of disks will refer to the remote host, which were mistakenly handled as local paths (in the best case failing to open a non-existing disk, and in the worst case opening a different disk!). In case the disks are remote resources like ssh or ceph, nothing guarantees that the hostname can be reached from the local machine, or even that it is actually the same on
2017 Jul 07
4
[PATCH v6 0/3] gobject: Remove gtk-doc (RHBZ#1465665).
Hopefully this time ...