search for: php_function

Displaying 20 results from an estimated 21 matches for "php_function".

2016 Apr 11
1
[PATCH] RFC: php: support PHP 7
...) 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 +234,11 @@ PHP_FUNCTION (guestfs_create) guestfs_set_error_handler (g, NULL, NULL); +#if ZEND_MODULE_API_NO >= 20151012 + ZVAL_RES(return_value, zend_register_resource(g, res_guestfs_h)); +#else ZEND_REGISTER_RESOURCE (return_value, g, res_guestfs_h); +#endif } PHP_FUNCTION (guestfs_last_error) @@ -204,1...
2015 Feb 10
4
[PATCH 1/4] php: fix invalid memory access with OptString
...ck 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 0ef6541..1384451 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -192,11 +192,13 @@ PHP_FUNCTION (guestfs_last_error) | String n | Device n | Mountable n | Pathname n | Dev_or_Path n | Mountable_or_Path n | FileIn n | FileOut n | Key n - | OptString n | BufferIn n | GUID n -> pr " char *%s;\n" n; pr &qu...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2014 Dec 10
2
[PATCH v1 0/2] Implement guestfs_add_libvirt_dom.
This is only lightly tested at the moment. For context see: https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40 https://bugzilla.redhat.com/show_bug.cgi?id=1075143 https://bugzilla.redhat.com/show_bug.cgi?id=1075164 Note this is not a complete fix. At least one more libguestfs patch is required (to implement virDomainPtr in the python bindings). Plus a virt-manager patch. Rich.
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...ist n | DeviceList n -> + | StringList n | DeviceList n | RelativePathnameList n -> pr "\\@%s" n ) args; List.iter ( diff --git a/generator/php.ml b/generator/php.ml index b49bf60..82e0cd4 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -240,7 +240,8 @@ PHP_FUNCTION (guestfs_last_error) pr " char *%s = NULL;\n" n; pr " int %s_size;\n" n | StringList n - | DeviceList n -> + | DeviceList n + | RelativePathnameList n -> pr " zval *z_%s;\n" n; p...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...StringList n | DeviceList n -> + | StringList n | DeviceList n | FilenameList n -> pr "\\@%s" n ) args; List.iter ( diff --git a/generator/php.ml b/generator/php.ml index b49bf60..cb0543a 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -240,7 +240,8 @@ PHP_FUNCTION (guestfs_last_error) pr " char *%s = NULL;\n" n; pr " int %s_size;\n" n | StringList n - | DeviceList n -> + | DeviceList n + | FilenameList n -> pr " zval *z_%s;\n" n; pr "...
2014 Dec 10
3
[PATCH v2 0/3] Implement guestfs_add_libvirt_dom.
This completes the implementation on the libguestfs side, allowing python-libvirt dom pointers to be passed to guestfs_add_libvirt_dom. For context see: https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40 https://bugzilla.redhat.com/show_bug.cgi?id=1075143 https://bugzilla.redhat.com/show_bug.cgi?id=1075164 Rich.
2014 Dec 11
4
[PATCH v3 0/4] Implement guestfs_add_libvirt_dom.
A hopefully cleaner implementation this time. It doesn't require any special insights into how libvirt-python is implemented. Instead, it requires a change to libvirt-python to add a .c_pointer() method: https://www.redhat.com/archives/libvir-list/2014-December/msg00615.html Rich.
2005 Dec 05
0
about php-ODBC , unixODBC, freetds and MSSQL server
...&nRowsAffected ); printf( "SQLRowCount returns %d\n", nRowsAffected ); if ( nRows ) { printf( "%d rows fetched\n", nRows ); } } from odbc php module php_odbc.c : /* {{{ proto int odbc_num_rows(resource result_id) Get number of rows in a result */ PHP_FUNCTION(odbc_num_rows) { odbc_result *result; SDWORD rows; pval **pv_res; if (zend_get_parameters_ex(1, &pv_res) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC result", le_result); SQLRowCount(result->stmt, &rows); RETURN_LON...
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 _ -> () ) args; + List.iter ( + function + | OBool n | OInt n | OInt64 n | OString n -> () + | OStringList n -> + let uc_n = String.uppercase n in...
2014 Dec 11
6
[PATCH v4 0/6] Implement guestfs_add_libvirt_dom.
Since v3: - Fix labelling over overlays (see 6/6) - Tested it with a test program which simulates what virt-manager will do. See the attachment here: https://bugzilla.redhat.com/show_bug.cgi?id=1075164#c7 Rich.
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...g.replace longdesc "C<guestfs_" "C<$g-E<gt>" in pr "=item "; generate_perl_prototype name style; diff --git a/generator/php.ml b/generator/php.ml index 3c0ace53a..f42626d01 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -55,7 +55,7 @@ PHP_FUNCTION (guestfs_last_error); "; List.iter ( - fun { name = name } -> pr "PHP_FUNCTION (guestfs_%s);\n" name + fun { name } -> pr "PHP_FUNCTION (guestfs_%s);\n" name ) (actions |> external_functions |> sort); pr "\ @@ -199,7 +199,7 @@ static zen...
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 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...| OptString n | Bool n | Int n | Int64 n | FileIn n | FileOut n | BufferIn n | Key n | Pointer (_, n) -> pr "$%s" n diff --git a/generator/php.ml b/generator/php.ml index 6618ce5..cf23863 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -188,7 +188,7 @@ PHP_FUNCTION (guestfs_last_error) List.iter ( function - | String n | Device n | Pathname n | Dev_or_Path n + | String n | Device n | Mountable n | Pathname n | Dev_or_Path n | FileIn n | FileOut n | Key n | OptString n | BufferIn n -> @@ -232,7 +232...
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.
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...alias !i; incr i ) non_c_aliases - ) all_functions_sorted; + ) external_functions_sorted; pr "\n"; (* End of file. *) diff --git a/generator/php.ml b/generator/php.ml index 4ed7b30..d457507 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -53,7 +53,7 @@ PHP_FUNCTION (guestfs_last_error); List.iter ( fun { name = name } -> pr "PHP_FUNCTION (guestfs_%s);\n" name - ) all_functions_sorted; + ) external_functions_sorted; pr "\ @@ -113,7 +113,7 @@ static zend_function_entry guestfs_php_functions[] = { List.iter ( fun {...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...| StringList n | DeviceList n | FilenameList n -> + | StringList (_, n) -> pr "\\@%s" n ) args; List.iter ( diff --git a/generator/php.ml b/generator/php.ml index 90869ef93..48cd89fdc 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -279,19 +279,14 @@ PHP_FUNCTION (guestfs_last_error) List.iter ( function - | String n | Device n | Mountable n | Pathname n - | Dev_or_Path n | Mountable_or_Path n - | FileIn n | FileOut n | Key n - | BufferIn n - | GUID n -> + | String (_, n) + | BufferIn n -...