Displaying 20 results from an estimated 43 matches for "foptperc".
Did you mean:
fatperc
2019 Jun 27
0
[PATCH 4/9] Rust bindings: Add generator of structs
...-> 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
+ | n, FUUID -> pr " %s: UUID,\n" n
+ | n, FOptPercent -> pr " %s: Option<f32>,\n" n
+ ) cols;
+ pr "}\n";
+ pr "#[repr(C)]\n";
+ pr "struct Raw%s {\n" name;
+ List.iter (
+ function
+ | n, FChar -> pr " %s: c_char,\n" n
+ | n, FString -...
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
...;\n"
name name
| name, FChar ->
- pr " add_assoc_stringl (return_value, \"%s\", &r->%s, 1, 1);\n"
+ pr " guestfs_add_assoc_stringl (return_value, \"%s\", &r->%s, 1, 1);\n"
name name
| name, FOptPercent ->
pr " add_assoc_double (return_value, \"%s\", r->%s);\n"
@@ -568,25 +615,30 @@ and generate_php_struct_list_code typ cols =
pr " array_init (return_value);\n";
pr " size_t c = 0;\n";
pr " for (c = 0; c < r->len; ++c...
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
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
...-> 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
- | n, FUUID -> pr " %s: UUID,\n" n
- | n, FOptPercent -> pr " %s: Option<f32>,\n" n
+ | n, FChar -> pr " pub %s: i8,\n" n
+ | n, FString -> pr " pub %s: String,\n" n
+ | n, FBuffer -> pr " pub %s: Vec<u8>,\n" n
+ | n, FUInt32 -> pr " p...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...;%%s%s: %%\" PRIi32 \"%%s\", indent, %s->%s, linesep);\n"
+ name typ name
+ | name, FChar ->
+ pr " fprintf (dest, \"%%s%s: %%c%%s\", indent, %s->%s, linesep);\n"
+ name typ name
+ | name, FOptPercent ->
+ pr " if (%s->%s >= 0)\n" typ name;
+ pr " fprintf (dest, \"%%s%s: %%g %%%%%%s\", indent, (double) %s->%s, linesep);\n"
+ name typ name;
+ pr " else\n";
+ pr "...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...escribe 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";
- pr " char %s[32];\n" name
- | name, FOptPercent ->
- pr " /* The next field is [0..100] or -1 meaning 'not present': */\n";
- pr " float %s;\n" name
+ function
+ | name, FChar -> pr " char %s;\n" name
+ | name, FUInt32 -> pr " uint32_t %s;\n" 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, FOptPercent ->
- pr " if (%s->%s >= 0)\n" typ name;
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " PyFloat_FromDouble ((double) %s->%s));\n"
- typ name;
+ pr...
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, FOptPercent ->
- pr " if (%s->%s >= 0)\n" typ name;
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " PyFloat_FromDouble ((double) %s->%s));\n"
- typ name;
+ pr...
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
...typ name
+ pr " value = PyLong_FromLong (%s->%s);\n" typ name;
+ pr " if (value == NULL)\n";
+ pr " goto err;\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FOptPercent ->
- pr " if (%s->%s >= 0)\n" typ name;
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " PyFloat_FromDouble ((double) %s->%s));\n"
- typ name;
+ pr...
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
...typ name
+ pr " value = PyLong_FromLong (%s->%s);\n" typ name;
+ pr " if (value == NULL)\n";
+ pr " goto err;\n";
+ pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
| name, FOptPercent ->
- pr " if (%s->%s >= 0)\n" typ name;
- pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " PyFloat_FromDouble ((double) %s->%s));\n"
- typ name;
+ pr...
2012 Jan 17
3
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres'
on these, meaning I have ensured that a bunch of basic manual tests work as
expected. I'm in the process of adding more comprehensive tests.
Here's an example simple javascript program which uses these bindings:
===
const Guestfs = imports.gi.Guestfs;
print('Starting');
var g = new
2019 Jul 20
0
[PATCH] Rust bindings: Add Rust bindings
...ub %s: u32,\n" n
+ | n, FInt32 -> pr " pub %s: i32,\n" n
+ | n, (FUInt64 | FBytes) -> pr " pub %s: u64,\n" n
+ | n, FInt64 -> pr " pub %s: i64,\n" n
+ | n, FUUID -> pr " pub %s: UUID,\n" n
+ | n, FOptPercent -> pr " pub %s: Option<f32>,\n" n
+ ) cols;
+ pr "}\n";
+ pr "#[repr(C)]\n";
+ pr "struct Raw%s {\n" name;
+ List.iter (
+ function
+ | n, FChar -> pr " %s: c_char,\n" n
+ | n, FStri...
2019 Jul 23
2
Re: [PATCH] Rust bindings: Add Rust bindings
...; + | n, FInt32 -> pr " pub %s: i32,\n" n
> + | n, (FUInt64 | FBytes) -> pr " pub %s: u64,\n" n
> + | n, FInt64 -> pr " pub %s: i64,\n" n
> + | n, FUUID -> pr " pub %s: UUID,\n" n
> + | n, FOptPercent -> pr " pub %s: Option<f32>,\n" n
> + ) cols;
> + pr "}\n";
> + pr "#[repr(C)]\n";
> + pr "struct Raw%s {\n" name;
> + List.iter (
> + function
> + | n, FChar -> pr " %s: c_...
2019 Jul 23
0
Re: [PATCH] Rust bindings: Add Rust bindings
...ub %s: u32,\n" n
+ | n, FInt32 -> pr " pub %s: i32,\n" n
+ | n, (FUInt64 | FBytes) -> pr " pub %s: u64,\n" n
+ | n, FInt64 -> pr " pub %s: i64,\n" n
+ | n, FUUID -> pr " pub %s: UUID,\n" n
+ | n, FOptPercent -> pr " pub %s: Option<f32>,\n" n
+ ) cols;
+ pr "}\n";
+ pr "#[repr(C)]\n";
+ pr "struct Raw%s {\n" name;
+ List.iter (
+ function
+ | n, FChar -> pr " %s: c_char,\n" n
+ | n, FStri...
2019 Jul 20
2
Re: [PATCH] Rust bindings: Add Rust bindings
> Is this just trying if the guestfs can be linked with?
Yes. In OCaml bindings, there is the corresponding test(
https://github.com/libguestfs/libguestfs/blob/master/ocaml/t/guestfs_010_load.ml).
I just mimicked it. If it is not required, I will remove it.
divided the generated files and handmade files in rust/src/ directory. I'll
send this fixed patch to this mailing list.
I'm not
2019 Jun 27
16
[PATCH 1/9] Rust bindings: Add Rust bindings
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com>
---
Makefile.am | 4 ++++
configure.ac | 3 +++
generator/Makefile.am | 3 +++
generator/bindtests.ml | 3 +++
generator/bindtests.mli | 1 +
generator/main.ml | 5 +++++
generator/rust.ml | 34 ++++++++++++++++++++++++++++++++++
generator/rust.mli | 19 +++++++++++++++++++
2019 Jul 08
2
Re: [PATCH] Add Rust bindings
On Mon, Jul 08, 2019 at 10:04:57AM +0100, Richard W.M. Jones wrote:
>On Mon, Jul 08, 2019 at 10:49:55AM +0200, Martin Kletzander wrote:
>> On Mon, Jul 08, 2019 at 10:10:10AM +0200, Pino Toscano wrote:
>> >On Saturday, 6 July 2019 13:03:24 CEST Martin Kletzander wrote:
>> >>Just one thing, the Cargo.toml includes a version under which the crate would be
>>
2019 Jul 29
1
Re: [PATCH] Rust bindings: Add Rust bindings
...ub %s: u32,\n" n
+ | n, FInt32 -> pr " pub %s: i32,\n" n
+ | n, (FUInt64 | FBytes) -> pr " pub %s: u64,\n" n
+ | n, FInt64 -> pr " pub %s: i64,\n" n
+ | n, FUUID -> pr " pub %s: UUID,\n" n
+ | n, FOptPercent -> pr " pub %s: Option<f32>,\n" n
+ ) cols;
+ pr "}\n";
+ pr "#[repr(C)]\n";
+ pr "struct Raw%s {\n" name;
+ List.iter (
+ function
+ | n, FChar -> pr " %s: c_char,\n" n
+ | n, FStri...
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs.
The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application.
Few notes regarding the comments on the previous patch.
- Added a