Displaying 6 results from an estimated 6 matches for "guestfs_int_py_asstring".
2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
...PyObject *guestfs_int_py_put_string_list (char * const * const argv);
extern PyObject *guestfs_int_py_put_table (char * const * const argv);
+extern PyObject *guestfs_int_py_fromstring (const char *str);
+extern PyObject *guestfs_int_py_fromstringsize (const char *str, size_t size);
+extern char *guestfs_int_py_asstring (PyObject *obj);
";
@@ -178,31 +181,16 @@ and generate_python_structs () =
function
| name, FString ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr &quo...
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
...PyObject *guestfs_int_py_put_string_list (char * const * const argv);
extern PyObject *guestfs_int_py_put_table (char * const * const argv);
+extern PyObject *guestfs_int_py_fromstring (const char *str);
+extern PyObject *guestfs_int_py_fromstringsize (const char *str, size_t size);
+extern char *guestfs_int_py_asstring (PyObject *obj);
";
@@ -178,31 +181,16 @@ and generate_python_structs () =
function
| name, FString ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr &quo...
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
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
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...pr "PHP_FUNCTION (guestfs_%s)\n" shortname;
pr "{\n";
pr " zval *z_g;\n";
diff --git a/generator/python.ml b/generator/python.ml
index 331367696..796e26aa5 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -121,7 +121,7 @@ extern char *guestfs_int_py_asstring (PyObject *obj);
pr "\n";
List.iter (
- fun { name = name; c_name = c_name } ->
+ fun { name; c_name } ->
pr "#ifdef GUESTFS_HAVE_%s\n" (String.uppercase_ascii c_name);
pr "extern PyObject *guestfs_int_py_%s (PyObject *self, PyObject *args)...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email:
https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html
I'd like to talk about requiring a more modern version of the OCaml
compiler.
These commits show some of the code changes which would be possible
with OCaml >= 3.12 [which it turns out we already require by accident]
and also with OCaml >= 4.02. The latter is my favoured option.
Rich.