Displaying 6 results from an estimated 6 matches for "get_stringlist".
Did you mean:
get_string_list
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
2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
...type_name, resource_type) \\
+ ZEND_FETCH_RESOURCE(rsrc, rsrc_type, &(passed_id), -1, resource_type_name, resource_type)
+typedef int guestfs_string_length;
+#endif
+
/* Convert array to list of strings.
* http://marc.info/?l=pecl-dev&m=112205192100631&w=2
*/
@@ -103,16 +129,28 @@ get_stringlist (zval *val)
HashTable *a;
int n;
HashPosition p;
+#if ZEND_MODULE_API_NO >= 20151012
+ zval *d;
+#else
zval **d;
+#endif
size_t c = 0;
a = Z_ARRVAL_P (val);
n = zend_hash_num_elements (a);
ret = safe_emalloc (n + 1, sizeof (char *), 0);
for (zend_hash_internal_point...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...pr ", &%s" n
@@ -372,7 +373,8 @@ PHP_FUNCTION (guestfs_last_error)
pr "\n"
| BufferIn n -> ()
| StringList n
- | DeviceList n ->
+ | DeviceList n
+ | RelativePathnameList n ->
pr " %s = get_stringlist (z_%s);\n" n n;
pr "\n"
| Bool _ | Int _ | Int64 _ -> ()
@@ -453,7 +455,8 @@ PHP_FUNCTION (guestfs_last_error)
| OptString n | GUID n -> ()
| BufferIn n -> ()
| StringList n
- | DeviceList n ->
+ | DeviceList...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...>
pr ", &%s" n
@@ -372,7 +373,8 @@ PHP_FUNCTION (guestfs_last_error)
pr "\n"
| BufferIn n -> ()
| StringList n
- | DeviceList n ->
+ | DeviceList n
+ | FilenameList n ->
pr " %s = get_stringlist (z_%s);\n" n n;
pr "\n"
| Bool _ | Int _ | Int64 _ -> ()
@@ -453,7 +455,8 @@ PHP_FUNCTION (guestfs_last_error)
| OptString n | GUID n -> ()
| BufferIn n -> ()
| StringList n
- | DeviceList n ->
+ | DeviceList...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...*)
@@ -422,9 +411,7 @@ PHP_FUNCTION (guestfs_last_error)
pr " }\n";
pr "\n"
| BufferIn n -> ()
- | StringList n
- | DeviceList n
- | FilenameList n ->
+ | StringList (_, n) ->
pr " %s = get_stringlist (z_%s);\n" n n;
pr "\n"
| Bool _ | Int _ | Int64 _ -> ()
@@ -499,14 +486,10 @@ PHP_FUNCTION (guestfs_last_error)
(* Free up parameters. *)
List.iter (
function
- | String n | Device n | Mountable n | Pathname n
- | Dev_or_...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.