search for: sv_2mortal

Displaying 12 results from an estimated 12 matches for "sv_2mortal".

2011 Oct 19
1
[hivex][PATCH 2/8] generator: Add new return type to ABI: RLenValue
...int64 = " @@ -2467,6 +2499,7 @@ DESTROY (h) | RValueList | RStringList | RLenType + | RLenValue | RLenTypeVal -> pr "void\n" | RInt32 -> pr "SV *\n" | RInt64 -> pr "SV *\n" @@ -2639,6 +2672,22 @@ DESTROY (h) pr " PUSHs (sv_2mortal (newSViv (type)));\n"; pr " PUSHs (sv_2mortal (newSViv (len)));\n"; + | RLenValue -> + pr "PREINIT:\n"; + pr " hive_value_h r;\n"; + pr " size_t len;\n"; + pr " PPCODE:\n"; + pr "...
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 = {
2014 Aug 16
7
[hivex] [PATCH 0/6] Python fixes for node_set_value
Hi, This patch series is based on a prior patch[1], splitting off changes as requested and incorporating feedback from Richard Jones. It introduces type validation to avoid segmentation faults (instead, it reports an exception) and fixes handling of the bytes type in Python 3. Major changes since that series: - Drop newly introduced support for integer types for DWORD/QWORDS - Reject Unicode
2011 Dec 08
0
[hivex] [PATCH 2/8] generator: Add new return type to ABI: RLenValue
...int64 = " @@ -2467,6 +2499,7 @@ DESTROY (h) | RValueList | RStringList | RLenType + | RLenValue | RLenTypeVal -> pr "void\n" | RInt32 -> pr "SV *\n" | RInt64 -> pr "SV *\n" @@ -2639,6 +2672,22 @@ DESTROY (h) pr " PUSHs (sv_2mortal (newSViv (type)));\n"; pr " PUSHs (sv_2mortal (newSViv (len)));\n"; + | RLenValue -> + pr "PREINIT:\n"; + pr " hive_value_h r;\n"; + pr " size_t len;\n"; + pr " PPCODE:\n"; + pr "...
2016 Dec 12
2
[PATCH] java: fix memory leak in RStruct actions
The return value struct was freed using a simple free() instead of the own cleanup function of each struct: this meant dynamically allocated values (such as strings) were leaked. Use the proper cleanup functions instead. --- generator/java.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/java.ml b/generator/java.ml index a68054c..3c1e611 100644 ---
2019 Jan 16
1
[hivex PATCH] perl: fix format of croak for RLenValue
...croak (\"%%s: \", \"%s\", strerror (errno));\n" + pr " croak (\"%%s: %%s\", \"%s\", strerror (errno));\n" name; pr " EXTEND (SP, 2);\n"; pr " PUSHs (sv_2mortal (newSViv (len)));\n"; -- 2.20.1
2017 Jan 31
4
[nbdkit PATCH v3 0/3] bind .zero to Perl
Requires patch 1 and 2 of the python series: https://www.redhat.com/archives/libguestfs/2017-January/msg00126.html This is the perl implementation along the same lines. We still haven't decided if patch 1 of the python series should change OCaml to report errno as reliable or not, but perhaps we can commit that patch as-is now and then touch things up further when we actually get set_error
2017 Jan 24
4
[nbdkit PATCH 0/2] bind .zero to more languages
Begin the language binding followups to my new .zero callback, since Rich was indeed correct that we want them. I'm more familiar with python and perl (at least to the point that I was able to modify the appropriate example files and prove to myself that the bindings worked), so I've started with those. I'm less familiar with ruby and ocaml, so I've left those for tomorrow (it
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...SV *\n" | RInt64 -> pr "SV *\n" @@ -2500,6 +2594,7 @@ DESTROY (h) | RErrDispose -> assert false | RHive -> assert false + | RSize | RNode | RValue -> pr "PREINIT:\n"; @@ -2603,6 +2698,34 @@ DESTROY (h) pr " PUSHs (sv_2mortal (newSViv (type)));\n"; pr " PUSHs (sv_2mortal (newSViv (len)));\n"; + | RLenNode -> + pr "PREINIT:\n"; + pr " int r;\n"; + pr " size_t len;\n"; + pr " PPCODE:\n"; + pr " r =...
2016 Dec 12
0
[PATCH] perl: fix memory leak in RStruct actions
.../perl.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/perl.ml b/generator/perl.ml index 290b687..4c7f805 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -657,7 +657,7 @@ and generate_perl_struct_code typ cols name style n = pr " PUSHs (sv_2mortal (newSVnv (r->%s)));\n" name ) cols; - pr " free (r);\n" + pr " guestfs_free_%s (r);\n" typ (* Generate Sys/Guestfs.pm. *) and generate_perl_pm () = -- 2.7.4
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch: https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html This adds OCaml and Perl bindings (both tested), support for progress bars in virt-resize, and adds progress notifications to a number of the simpler commands. Still to do is to add progress messages to more commands. There are still a few commands which would be
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...uot; n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; - pr " for (n = 0; %s[n] != NULL; ++n) /**/;\n" n; - pr " EXTEND (SP, n);\n"; - pr " for (i = 0; i < n; ++i) {\n"; - pr " PUSHs (sv_2mortal (newSVpv (%s[i], 0)));\n" n; - pr " free (%s[i]);\n" n; - pr " }\n"; - pr " free (%s);\n" n; + pr "PREINIT:\n"; + pr " char **%s;\n" n; + pr " int i, n;\n"; +...