similar to: [PATCH] python: PyInt_* no longer exists in python3, replace with PyLong_*

Displaying 20 results from an estimated 300 matches similar to: "[PATCH] python: PyInt_* no longer exists in python3, replace with PyLong_*"

2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions, in mllib/common_utils.ml and generator/utils.ml. This changes things so that the same set of utility functions can be shared with both directories. It's not possible to use common_utils.ml directly in the generator because it provides several functions that use modules outside the OCaml stdlib. Therefore we add some
2014 Aug 11
3
[PATCH] python: fix possible free on uninit memory with OStringList optargs
When using optional arguments of type OStringList, the code free'ing the member in the optargs_s struct corresponding to that optional argument would just check for a non-PyNone PyObject for that argument. If before that optional argument there are other arguments which can cause an earlier error return from that binding function, the free'ing code will then act on garbage values. Enhance
2017 May 09
0
[PATCH] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of PyString_FromString makes both the OCaml code of the generator, and the generated C code a mess to read. Hence, add three simple wrappers to make both the OCaml, and C code more readable, and easier to tweak in the future. --- generator/python.ml | 72 ++++++++++++----------------------------------------- python/handle.c | 52
2017 May 09
1
[PATCH v2] python: add simple wrappers for PyObject<->string functions
The current need for #ifdef's based on the presence of PyString_FromString makes both the OCaml code of the generator, and the generated C code a mess to read. Hence, add three simple wrappers to make both the OCaml, and C code more readable, and easier to tweak in the future. --- generator/python.ml | 72 ++++++++++++----------------------------------------- python/handle.c | 65
2015 Feb 10
0
[PATCH 4/4] php: fix memory leak in OStringList optargs
Make sure to free the char** created to convert the arguments. --- generator/php.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/generator/php.ml b/generator/php.ml index 28903d0..b49bf60 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -458,6 +458,16 @@ PHP_FUNCTION (guestfs_last_error) pr "\n" | Bool _ | Int _ | Int64 _ | Pointer _ ->
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
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
From: Sergei Golovan <sgolovan@gmail.com> Replace the use of liberl_interface, which is removed in Erlang 23, by libei. The implementation uses the ei_decode_iodata() function which has been introduces only for Erlang 23, so it doesnt work with earlier Erlang versions. --- erlang/Makefile.am | 1 - erlang/main.c | 312 +++++++++++++++++++++++++-------------------
2017 Jul 14
0
[PATCH 07/27] daemon: Reimplement ‘is_dir’, ‘is_file’ and ‘is_symlink’ APIs in OCaml.
This also demonstrates usage of optional arguments. --- daemon/Makefile.am | 2 ++ daemon/is.c | 41 ----------------------------------------- daemon/is.ml | 44 ++++++++++++++++++++++++++++++++++++++++++++ daemon/is.mli | 21 +++++++++++++++++++++ generator/actions_core.ml | 3 +++ generator/daemon.ml | 7 ++++--- 6 files changed, 74
2012 Aug 25
1
[PATCH] python: Fixed syntax errors in python/guestfs-py.c
Signed-off-by: Masami HIRATA <msmhrt at gmail.com> --- generator/generator_python.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator_python.ml b/generator/generator_python.ml index dc9cbca..b11df6e 100644 --- a/generator/generator_python.ml +++ b/generator/generator_python.ml @@ -391,7 +391,7 @@ free_strings (char **argv) pr "
2010 Sep 09
2
[PATCH]: add libxl python binding
Changes since last time: - split auto-generated code in to c and h files - un-break the build system - fix ocaml binding due to libxl API change - lot''s of tidy-ups too numerous to mention Please consider and apply :) -----8<--------------------------------------------------------------- Introduce python binding for libxl. The binding is not yet complete but list_domains,
2018 Aug 10
2
[PATCH] Change wording from "twice" to "more than once" in error messages
When erroring out about duplicated parameters, say "more than once" instead of "twice", since there can be more than two repeated parameters. Thanks to: Xiaodai Wang --- generator/fish.ml | 2 +- generator/perl.ml | 2 +- resize/resize.ml | 4 ++-- tools/virt-tar | 4 ++-- v2v/input_libvirt_vddk.ml | 2 +- v2v/output_rhv_upload.ml | 4 ++--
2012 Jan 17
2
[PATCH 1/2] c: NFC Remove redundant parentheses
--- generator/generator_c.ml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 4324ec0..9cfb2b7 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -1187,7 +1187,7 @@ trace_send_line (guestfs_h *g) let n = name_of_optargt argt in let uc_shortname = String.uppercase
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
Before this patch, Python would segfault once you pass a non-string key or value to node_set_value. It was also not possible to set bytes on Python 3 as Unicode was assumed (Python 2 was not affected by this). This patch fixes recognition of bytes for Python 3, but in addition it recognizes ints (includes 'long' in Python 2) for DWORD (LE + BE) and QWORDs. For this purpose, a new field
2012 Sep 16
3
Remaining syntax-check errors in libguestfs
... and why they are (probably) not errors. > bindtextdomain > daemon/guestfsd.c > erlang/erl-guestfs-proto.c > examples/copy_over.c > examples/create_disk.c > examples/display_icon.c > examples/inspect_vm.c > examples/mount_local.c > examples/virt-dhcp-address.c > tests/c-api/test-add-drive-opts.c > tests/c-api/test-add-libvirt-dom.c >
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
If you have a struct containing ?field?, eg: type t = { field : int } then previously to pattern-match on this type, eg. in function parameters, you had to write: let f { field = field } = (* ... use field ... *) In OCaml >= 3.12 it is possible to abbreviate cases where the field being matched and the variable being bound have the same name, so now you can just write: let f {
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2017 Jul 14
0
[PATCH 02/27] daemon: Allow parts of the daemon and APIs to be written in OCaml.
This change allows parts of the daemon to be written in the OCaml programming language. I am using the ‘Main Program in C’ method along with ‘-output-obj’ to create an object file from the OCaml code / runtime, as described here: https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html Furthermore, change the generator to allow individual APIs to be implemented in OCaml. This is picked by
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2013 Aug 14
0
[LLVMdev] lit support for Python3
> If anyone is interested in this support, I'd appreciate it if you changed > your setup to use Python3 for running the tests and let me know (or file > bugs) for any issues you find. Excellent! The only reason I set my interpreter back to 2.7 a while back was LLVM. Back to 3.2 now. Tim. P.S. All passes here too.
2013 Aug 14
2
[LLVMdev] lit support for Python3
On Wed, Aug 14, 2013 at 1:15 PM, Tim Northover <t.p.northover at gmail.com>wrote: > > If anyone is interested in this support, I'd appreciate it if you changed > > your setup to use Python3 for running the tests and let me know (or file > > bugs) for any issues you find. > Great work, Daniel. All LLVM tests pass for me on trunk when running with Python 3.4 alpha.