Displaying 13 results from an estimated 13 matches for "put_handle".
Did you mean:
out_handle
2016 May 05
1
[PATCH] python: use constants instead of raw values
...;
+ PyModule_AddIntMacro(module, GUESTFS_CREATE_NO_CLOSE_ON_EXIT);
+}
+
PyObject *
guestfs_int_py_create (PyObject *self, PyObject *args)
{
diff --git a/python/guestfs-py.h b/python/guestfs-py.h
index da5f483..f2246a6 100644
--- a/python/guestfs-py.h
+++ b/python/guestfs-py.h
@@ -59,6 +59,8 @@ put_handle (guestfs_h *g)
#endif
}
+extern void guestfs_int_py_extend_module (PyObject *module);
+
extern PyObject *guestfs_int_py_create (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_close (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_set_event_callback (PyObjec...
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
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...ins/curl/curldefs.h
index c2a3432fc..d614379d0 100644
--- a/plugins/curl/curldefs.h
+++ b/plugins/curl/curldefs.h
@@ -117,9 +117,10 @@ struct curl_handle {
};
/* pool.c */
+extern void load_pool (void);
+extern void unload_pool (void);
extern struct curl_handle *get_handle (void);
extern void put_handle (struct curl_handle *ch);
-extern void free_all_handles (void);
/* scripts.c */
extern int do_scripts (struct curl_handle *ch);
diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index b5927b5b4..b8624a6f8 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -101,6 +101,8 @@ curl_l...
2018 Feb 05
0
Re: python 3 bindings on libguestfs
...:
>
> **********************************************************************
> make[2]: Entering directory `/root/rpmbuild/SOURCES/libguestfs-1.32.4/python'
> CC libguestfsmod_la-guestfs-py.lo
> In file included from guestfs-py.c:36:0:
> guestfs-py.h: In function 'put_handle':
> guestfs-py.h:56:5: warning: implicit declaration of function 'PyCObject_FromVoidPtrAndDesc' [-Wimplicit-function-declaration]
> PyCObject_FromVoidPtrAndDesc ((void *) g, (char *) "guestfs_h", NULL);
> ^
> guestfs-py.h:56:5: warning: nested extern decl...
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
...dle.c | 18 ++++++++++++++++--
python/t/test830RHBZ1406906.py | 6 ++++++
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/generator/python.ml b/generator/python.ml
index f7c1f80bb..66bb7f27d 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -82,6 +82,7 @@ put_handle (guestfs_h *g)
}
extern void guestfs_int_py_extend_module (PyObject *module);
+extern PyObject *guestfs_int_py_set_decode_error_handler (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_create (PyObject *self, PyObject *args);
extern PyObject *guestfs_int_py_close (PyObject *s...
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
...ring in libpython])],
- [],[$PYTHON_BLDLIBRARY])
LIBS="$old_LIBS"
fi
diff --git a/generator/generator.ml b/generator/generator.ml
index bcf1966..0aeb24e 100755
--- a/generator/generator.ml
+++ b/generator/generator.ml
@@ -2837,45 +2837,90 @@ put_handle (hive_h *h)
* not be freed.
*/
static int
-get_value (PyObject *v, hive_set_value *ret)
+get_value (PyObject *v, hive_set_value *ret, uint64_t *word)
{
PyObject *obj;
-#ifndef HAVE_PYSTRING_ASSTRING
PyObject *bytes;
-#endif
+
+ if (!PyDict_Check (v)) {
+ PyErr_SetString (PyExc_TypeE...
2012 May 25
0
[PATCH 3/3] gnttab: cleanup
...__gnttab_unmap_common_complete(struct gnttab_unmap_common *op)
{
- struct domain *ld, *rd;
+ struct domain *ld, *rd = op->rd;
+ struct grant_table *rgt;
struct active_grant_entry *act;
grant_entry_header_t *sha;
struct page_info *pg;
uint16_t *status;
bool_t put_handle = 0;
- rd = op->rd;
-
if ( rd == NULL )
{
/*
@@ -941,18 +945,19 @@ __gnttab_unmap_common_complete(struct gn
ld = current->domain;
rcu_lock_domain(rd);
- spin_lock(&rd->grant_table->lock);
+ rgt = rd->grant_table;
+ spin_lock(&rgt-...
2023 Feb 22
2
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
I'm mainly posting this to the list as a back-up. It does work, it
does _not_ improve performance in any noticable way. However I'm
having lots of trouble getting HTTP/2 to work (with or without this
patch) and that's stopping me from testing anything properly.
Rich.
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...644
> --- a/plugins/curl/curldefs.h
> +++ b/plugins/curl/curldefs.h
> @@ -117,9 +117,10 @@ struct curl_handle {
> };
>
> /* pool.c */
> +extern void load_pool (void);
> +extern void unload_pool (void);
> extern struct curl_handle *get_handle (void);
> extern void put_handle (struct curl_handle *ch);
> -extern void free_all_handles (void);
>
> /* scripts.c */
> extern int do_scripts (struct curl_handle *ch);
> diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
> index b5927b5b4..b8624a6f8 100644
> --- a/plugins/curl/curl.c
> +++ b/plugin...
2020 Jan 09
9
[PATCH 0/7] Various Python cleanups.
Patch #7 depends on:
https://www.redhat.com/archives/libguestfs/2020-January/msg00035.html
No, Python < 3 support is not dropped yet, however it will be easier
after this series.
Pino Toscano (7):
build: enforce a minimum Python version
python: drop code for Python < 2.5
python: assume support for Capsules
python: remove compile time check for PyString_AsString
python: replace
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...ot;]
+ | RLenNode | RLenValue -> c_params @ ["&len"]
| _ -> c_params in
List.iter (
@@ -3023,6 +3164,7 @@ put_val_type (char *val, size_t len, hive_type t)
pr " py_r = Py_None;\n"
| RHive ->
pr " py_r = put_handle (r);\n"
+ | RSize
| RNode ->
pr " py_r = PyLong_FromLongLong (r);\n"
| RNodeNotFound ->
@@ -3046,6 +3188,10 @@ put_val_type (char *val, size_t len, hive_type t)
pr " free_strings (r);\n"
| RLenType ->...
2014 Aug 04
6
[hivex] Segfault for an integer value to node_set_value
Hi,
When an integer argument is passed as value, node_set_value
segfaults. Reproducer is at the end of this message
The backtrace points at hivex-py.c, function get_value. While obj
is non-NULL, `bytes = PyUnicode_AsUTF8String (obj);` returns NULL.
Kind regards,
Peter
https://lekensteyn.nl
#!/usr/bin/env python3
import hivex, sys
h = hivex.Hivex(sys.argv[1])
print(h)
val = {
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules