Displaying 20 results from an estimated 55 matches for "fbuffer".
Did you mean:
buffer
2019 Jan 22
0
[PATCH v2 2/2] python: change types for RBufferOut/FBuffer with Python 3 (RHBZ#1661871)
So far RBufferOut return values, and FBuffer struct fields are 'str' on
all the versions of Python. Python 3 distinguishes between 'str'
(unicode strings), and 'bytes', with 'str' no more able to hold
arbitrary data.
For this reason, switch the return value of RBufferOut functions, and
FBuffer struct fields t...
2019 Jan 22
3
[PATCH v2 0/2] python: fixes for Python 3
A couple of fixes for Python 3 to the Python binding.
Unfortunately a behaviour change is needed, although it fixes broken
types used.
Changes from v1:
- handle also FBuffer in structs
Pino Toscano (2):
python: fix call of Python handlers of events
python: change types for RBufferOut/FBuffer with Python 3
(RHBZ#1661871)
generator/python.ml | 9 +++++++++
python/handle.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
--
2.20.1
2012 Jan 20
2
GObject bindings overview
I've summarised how the GObject bindings work below, which should
hopefully help reviewing the generator/generated code.
There are a couple of points in here I'm still not 100% happy with.
Specifically the handling of FBuffer and the Cancellable flag. Both are
explained below. I'm interested in suggestions.
Return values:
**************
All functions which can return an error have as their final argument a
GError **. GI maps this to the appropriate error mechanism for each
target language.
RErr returns a gbool...
2019 Jun 27
0
[PATCH 4/9] Rust bindings: Add generator of structs
...amel_name = name; s_name = c_name; s_cols = cols } ->
+ pr "\n";
+ pr "pub struct %s {\n" name;
+ List.iter (
+ function
+ | n, FChar -> pr " %s: i8,\n" n
+ | n, FString -> pr " %s: String,\n" n
+ | n, FBuffer -> pr " %s: Vec<u8>,\n" n
+ | n, FUInt32 -> pr " %s: u32,\n" n
+ | n, FInt32 -> pr " %s: i32,\n" n
+ | n, (FUInt64 | FBytes) -> pr " %s: u64,\n" n
+ | n, FInt64 -> pr " %s: i64,\n" n
+...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...<inttypes.h>
+
+#include \"c-ctype.h\"
+
+#include \"guestfs.h\"
+#include \"structs-print.h\"
+
+";
+
+ let write_structs =
+ List.iter (
+ fun { s_name = typ; s_cols = cols } ->
+ let needs_i =
+ List.exists (function (_, (FUUID|FBuffer)) -> true | _ -> false) cols in
+
+ pr "void\n";
+ pr "guestfs_int_print_%s_indent (struct guestfs_%s *%s, FILE *dest, const char *linesep, const char *indent)\n"
+ typ typ typ;
+ pr "{\n";
+ if needs_i then (
+ pr &q...
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
...ct_code typ cols =
List.iter (
function
| name, FString ->
- pr " add_assoc_string (return_value, \"%s\", r->%s, 1);\n" name name
+ pr " guestfs_add_assoc_string (return_value, \"%s\", r->%s, 1);\n" name name
| name, FBuffer ->
- pr " add_assoc_stringl (return_value, \"%s\", r->%s, r->%s_len, 1);\n"
+ pr " guestfs_add_assoc_stringl (return_value, \"%s\", r->%s, r->%s_len, 1);\n"
name name name
| name, FUUID ->
- pr "...
2017 Mar 03
14
[PATCH 00/11] Various Coverity fixes
Hi,
this patch series fixes some issues discovered by Coverity.
Most of them are memory leaks, usually on error; there are also invalid
memory access issues.
Thanks,
Pino Toscano (11):
java: link libguestfs_jni against libutils
java: fix invalid memory access for FBuffer in struct lists
daemon: tsk: properly use GUESTFS_MAX_CHUNK_SIZE
edit: fix small memory leak on error
java: fix possible memory leak on error
fish: fully init the msghdr buffers
tail: pass the right path for Windows guests
ocaml: do not try to malloc 0 elements in get_all_event_callback...
2012 Mar 28
1
[PATCH] Split gobject sources into 1 file per class
This patch replaces patches 14 and 15 from my previous series. The gtk-doc
output is now reasonable, and we can rely on an automatically generated
guestfs-sections.txt.
Matt
2017 Mar 03
1
Re: [PATCH 01/11] java: link libguestfs_jni against libutils
On Fri, Mar 03, 2017 at 03:32:55PM +0100, Pino Toscano wrote:
> The JNI library uses CLEANUP_FREE macros, whose functions are built in
> the internal libutils. Currently, trying to use functions that use
> CLEANUP_FREE variables will cause the java execution to stop with a
> symbol lookup error (for guestfs_int_cleanup_free).
[comment only]
I wonder why our tests didn't pick this
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
...self.uuid
+ }
}
";
List.iter (
@@ -185,15 +255,15 @@ impl UUID {
pr "pub struct %s {\n" name;
List.iter (
function
- | n, FChar -> pr " %s: i8,\n" n
- | n, FString -> pr " %s: String,\n" n
- | n, FBuffer -> pr " %s: Vec<u8>,\n" n
- | n, FUInt32 -> pr " %s: u32,\n" n
- | n, FInt32 -> pr " %s: i32,\n" n
- | n, (FUInt64 | FBytes) -> pr " %s: u64,\n" n
- | n, FInt64 -> pr " %s: i64,\n" n
-...
2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
...else\n";
- pr " PyUnicode_FromString (%s->%s));\n"
- typ name;
- pr "#endif\n"
+ pr " guestfs_int_py_fromstring (%s->%s));\n"
+ typ name
| name, FBuffer ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr " PyString_FromStringAndSize (%s->%s, %s->%s_len));\n"
- typ name typ name;
-...
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
...else\n";
- pr " PyUnicode_FromString (%s->%s));\n"
- typ name;
- pr "#endif\n"
+ pr " guestfs_int_py_fromstring (%s->%s));\n"
+ typ name
| name, FBuffer ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr " PyString_FromStringAndSize (%s->%s, %s->%s_len));\n"
- typ name typ name;
-...
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
...,\n";
+ pr " \"Error setting %s.%s\");\n" typ name;
+ pr " return NULL;\n";
+ pr " }\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FBuffer ->
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr " PyString_FromStringAndSize (%s->%s, %s->%s_len));\n"
+ pr " value = PyStri...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...; pr " uint32_t %s;\n" name
- | name, FInt32 -> pr " int32_t %s;\n" name
- | name, (FUInt64|FBytes) -> pr " uint64_t %s;\n" name
- | name, FInt64 -> pr " int64_t %s;\n" name
- | name, FString -> pr " char *%s;\n" name
- | name, FBuffer ->
- pr " /* The next two fields describe a byte array. */\n";
- pr " uint32_t %s_len;\n" name;
- pr " char *%s;\n" name
- | name, FUUID ->
- pr " /* The next field is NOT nul-terminated, be careful when printing it: */\n";
-...
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
...,\n";
+ pr " \"Error setting %s.%s\");\n" typ name;
+ pr " return NULL;\n";
+ pr " }\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FBuffer ->
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
- pr " PyString_FromStringAndSize (%s->%s, %s->%s_len));\n"
+ pr " value = PyStri...
2020 Mar 10
2
ANNOUNCE: libguestfs 1.42 - tools for accessing and modifying virtual machine disk images
...le_architecture` for a file
https://bugzilla.redhat.com/1680361
[v2v][RHV][Scale] v2v Migration to RHV failed on timed out waiting
for transfer to finalize
https://bugzilla.redhat.com/1661871
python bindings wrongly using str for APIs with RBufferOut/FBuffer
on Python 3
https://bugzilla.redhat.com/1626503
Unable to maintain static IP address configuration post VM
migration
https://bugzilla.redhat.com/1612653
Guest has no disk after rhv-upload converting if target data domain
has sim...
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
...p name
+ pr " value = guestfs_int_py_fromstring (%s->%s);" typ name;
+ pr " if (value == NULL)\n";
+ pr " goto err;\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FBuffer ->
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " guestfs_int_py_fromstringsize (%s->%s, %s->%s_len));\n"
- typ name typ name
+ pr " value = guestfs_int_py_fromstringsize (...
2019 Jul 02
16
[PATCH] Add Rust bindings
I fixed the patch I submitted before based on comments, and there are some
commits which are merged or divided. So, I will re-send all the patches.
Regards,
Hiroyuki Katsura
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
...p name
+ pr " value = guestfs_int_py_fromstring (%s->%s);" typ name;
+ pr " if (value == NULL)\n";
+ pr " goto err;\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FBuffer ->
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " guestfs_int_py_fromstringsize (%s->%s, %s->%s_len));\n"
- typ name typ name
+ pr " value = guestfs_int_py_fromstringsize (...
2009 Sep 24
1
enabling more syntax-checks
...;#include <ctype.h>\n";
pr "\n";
pr "#include <guestfs.h>\n";
+ pr "#include \"c-ctype.h\"\n";
pr "#include \"fish.h\"\n";
pr "\n";
@@ -6193,7 +6193,7 @@ and generate_fish_cmds () =
| name, FBuffer ->
pr " printf (\"%%s%s: \", indent);\n" name;
pr " for (i = 0; i < %s->%s_len; ++i)\n" typ name;
- pr " if (isprint (%s->%s[i]))\n" typ name;
+ pr " if (c_isprint (%s->%s[i]))\n"...