search for: guestfs_efree_stringlist

Displaying 7 results from an estimated 7 matches for "guestfs_efree_stringlist".

2015 Feb 10
4
[PATCH 1/4] php: fix invalid memory access with OptString
OptString maps to a "s!" argument, which makes zend_parse_parameters not touch the variables (char* and length) when NULL is passed as parameter. Hence, set both to NULL/0, and check for non-NULL char* variable before checking its length. --- generator/php.ml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/generator/php.ml b/generator/php.ml index
2015 Feb 10
0
[PATCH 4/4] php: fix memory leak in OStringList optargs
...+ function + | OBool n | OInt n | OInt64 n | OString n -> () + | OStringList n -> + let uc_n = String.uppercase n in + pr " if ((optargs_s.bitmask & %s_%s_BITMASK) != 0)\n" + c_optarg_prefix uc_n; + pr " guestfs_efree_stringlist ((char **) optargs_s.%s);\n" n; + pr "\n" + ) optargs; (* Check for errors. *) (match errcode_of_ret ret with -- 1.9.3
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
...;p) == SUCCESS; +#endif zend_hash_move_forward_ex (a, &p)) { +#if ZEND_MODULE_API_NO >= 20151012 + zval t = *d; +#else zval t = **d; +#endif zval_copy_ctor (&t); convert_to_string (&t); ret[c] = estrndup (Z_STRVAL(t), Z_STRLEN (t)); @@ -133,8 +171,13 @@ guestfs_efree_stringlist (char **p) efree (p); } +#if ZEND_MODULE_API_NO >= 20151012 +static void +guestfs_php_handle_dtor (zend_resource *rsrc) +#else static void guestfs_php_handle_dtor (zend_rsrc_list_entry *rsrc TSRMLS_DC) +#endif { guestfs_h *g = (guestfs_h *) rsrc->ptr; if (g != NULL) @@ -191,7 +...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...ol _ | Int _ | Int64 _ -> () @@ -453,7 +455,8 @@ PHP_FUNCTION (guestfs_last_error) | OptString n | GUID n -> () | BufferIn n -> () | StringList n - | DeviceList n -> + | DeviceList n + | RelativePathnameList n -> pr " guestfs_efree_stringlist (%s);\n" n; pr "\n" | Bool _ | Int _ | Int64 _ | Pointer _ -> () diff --git a/generator/python.ml b/generator/python.ml index 1e043fc..b8329a5 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -292,7 +292,7 @@ put_table (char * const * const argv)...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...| Bool _ | Int _ | Int64 _ -> () @@ -453,7 +455,8 @@ PHP_FUNCTION (guestfs_last_error) | OptString n | GUID n -> () | BufferIn n -> () | StringList n - | DeviceList n -> + | DeviceList n + | FilenameList n -> pr " guestfs_efree_stringlist (%s);\n" n; pr "\n" | Bool _ | Int _ | Int64 _ | Pointer _ -> () diff --git a/generator/python.ml b/generator/python.ml index 1e043fc..9b3037c 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -292,7 +292,7 @@ put_table (char * const * const argv)...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...eOut n | Key n - | OptString n | GUID n -> () - | BufferIn n -> () - | StringList n - | DeviceList n - | FilenameList n -> + | String _ + | OptString _ + | BufferIn _ -> () + | StringList (_, n) -> pr " guestfs_efree_stringlist (%s);\n" n; pr "\n" | Bool _ | Int _ | Int64 _ | Pointer _ -> () diff --git a/generator/python.ml b/generator/python.ml index 11dc48102..2e614b57b 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -314,15 +314,13 @@ and generate_python_actions act...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.