Displaying 20 results from an estimated 900 matches similar to: "[PATCH] python: Inherit from 'object' base class."
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
2016 May 05
1
[PATCH] python: use constants instead of raw values
Extend the internal libguestfsmod module with the CREATE values, so
there is no need to hardcode values in GuestFS.__init__.
---
generator/python.ml | 7 +++++--
python/guestfs-py-byhand.c | 7 +++++++
python/guestfs-py.h | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/generator/python.ml b/generator/python.ml
index 9744b8f..470abe7 100644
---
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters.
This series continues what proposed in RHBZ#1406906.
A new function 'set_decode_error_handler' allows the User to specify
how to deal with decoding errors.
The default behaviour will be raising a UnicodeDecodeError.
If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped
in a
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
The set_decode_error_handler function allows the User to set the
decoding error scheme to be used when non UTF8 characters are
encountered in Python 3.
The function has no effect in Python 2.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 16 ++++++++++++++++
python/handle.c | 18 ++++++++++++++++--
python/t/test830RHBZ1406906.py |
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
- fix the syntax of hyperlinks
- replace the deprecation text with a simplier named list item, so it's
more visible
- use a named list item for the pointer to the C documentation of each
API
- add a named list item for the version of each API
---
generator/ruby.ml | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/generator/ruby.ml
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
The .new method was unintentionally broken in
commit 9466060201600db47016133d80af22eb38091a49.
This fixes the .new method and allows it to be called with multiple
parameters, so you can use:
Guestfs::Guestfs.new
Guestfs::Guestfs.new()
Guestfs::Guestfs.new(:close_on_exit => false)
etc.
For backwards compatibility, Guestfs::create may still be used.
This commit also adds regression
2016 Feb 12
2
[PATCH] python: tests: use more targeted assert*() functions/checks
- use assertIsInstance, assertNotEqual, and assertIsNotNone as more
specific checks (will produce better logging)
- use assertRaises when expecting exceptions being thrown
- when testing internal_test_rhashtable, instead of checking type and
elements of the return values just check the return value as a whole
(easier and already getting all the work needed by unittest)
---
2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
Miscellaneous improvements to the ocamldoc:
- Generate more sub-headings.
- Document the object-oriented API.
- Use a common function to generate the doc for module and OO APIs.
---
generator/ocaml.ml | 84 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 49 insertions(+), 35 deletions(-)
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 465df3c..2be3b7e
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
$ virt-sparsify input output
[ 0.0] Create overlay file in /tmp to protect source disk
[ 0.0] Examine source disk
^C
guestfs_close: g->lock: Device or resource busy
Aborted (core dumped)
The reason for this is because virt-sparsify calls exit(2) in the
SIGINT signal handler, which causes the close_handles atexit handler
to run, which calls guestfs_close. However the same handle is in the
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
2023 Sep 22
2
[PATCH 2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct ip_hw_instance.
[1]
2023 Sep 22
2
[PATCH 2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct ip_hw_instance.
[1]
2023 Sep 22
2
[PATCH 2/9] drm/amdgpu/discovery: Annotate struct ip_hw_instance with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct ip_hw_instance.
[1]
2013 Feb 04
1
[PATCH] 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
2011 Mar 19
1
[patch 2/2] xen-gntdev: unlock on error path in gntdev_mmap()
We should unlock here and also decrement the number of &map->users.
Signed-off-by: Dan Carpenter <error27 at gmail.com>
---
I'm not very familiar with this code. Please review carefully.
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 017ce60..b0f9e8f 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -662,7 +662,7 @@ static int gntdev_mmap(struct
2011 Mar 19
1
[patch 2/2] xen-gntdev: unlock on error path in gntdev_mmap()
We should unlock here and also decrement the number of &map->users.
Signed-off-by: Dan Carpenter <error27 at gmail.com>
---
I'm not very familiar with this code. Please review carefully.
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 017ce60..b0f9e8f 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -662,7 +662,7 @@ static int gntdev_mmap(struct
2011 Mar 19
1
[patch 2/2] xen-gntdev: unlock on error path in gntdev_mmap()
We should unlock here and also decrement the number of &map->users.
Signed-off-by: Dan Carpenter <error27 at gmail.com>
---
I'm not very familiar with this code. Please review carefully.
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 017ce60..b0f9e8f 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -662,7 +662,7 @@ static int gntdev_mmap(struct
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
'tc_410_close_event.rb' was not being run. You could prove this by
simply inserting "exit 1" into that test.
The reason is unclear, but by renaming every class and method in the
tests to be unique, this ensures the tests are run.
---
ruby/t/tc_010_load.rb | 4 ++--
ruby/t/tc_020_create.rb | 4 ++--
ruby/t/tc_030_create_flags.rb | 4 ++--
2012 Aug 19
2
[PATCH 10/10] drm/nouveau: fix off-by-one bugs related to command submission in IB mode
Commit "drm/nouveau: port all engines to new engine module format" changed
IB size calculation to be less wasteful, but didn't take into account already
existing off-by-one bugs :).
So:
- ib_max is the last entry, so we need to +1 when calculating number of
free entries
- nv50_dma_wait already does +1 (for FIRE_RING), so we don't need another +1
on nouveau_gem_ioctl_pushbuf
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
---
generator/ruby.ml | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/generator/ruby.ml b/generator/ruby.ml
index 97ccfdc..0f71ccc 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv)
return Qnil;
}
+/* Callbacks aren't supposed to throw exceptions. We just print the
+ * exception on