[libvirt-php PATCH 13/29] fix missed (hidden) zpp calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Remi Collet <fedora@xxxxxxxxxxxxxxxxx>

---
 src/libvirt-php.c | 279 +++++++++++++++++++++++++++---------------------------
 1 file changed, 141 insertions(+), 138 deletions(-)

diff --git a/src/libvirt-php.c b/src/libvirt-php.c
index 653d251..fe84f16 100644
--- a/src/libvirt-php.c
+++ b/src/libvirt-php.c
@@ -2279,7 +2279,7 @@ PHP_FUNCTION(libvirt_node_get_cpu_stats)
     int cpuNum = VIR_NODE_CPU_STATS_ALL_CPUS;
     virNodeCPUStatsPtr params;
     virNodeInfo info;
-    long cpunr = -1;
+    zend_long cpunr = -1;
     int nparams = 0;
     int i, j, numCpus;
 
@@ -2380,7 +2380,7 @@ PHP_FUNCTION(libvirt_node_get_cpu_stats_for_each_cpu)
     virNodeCPUStatsPtr params;
     virNodeInfo info;
     int nparams = 0;
-    long avg = 0, iter = 0;
+    zend_long avg = 0, iter = 0;
     int done = 0;
     int i, j, numCpus;
     time_t startTime = 0;
@@ -2830,12 +2830,12 @@ PHP_FUNCTION(libvirt_image_create)
     char *path = NULL;
     char fpath[4096] = { 0 };
     char *image = NULL;
-    int image_len;
+    strsize_t image_len;
     char *format;
-    int format_len;
+    strsize_t format_len;
     long long size;
     char *size_str;
-    int size_str_len;
+    strsize_t size_str_len;
     int cmdRet;
 
     if (LIBVIRT_G(image_path_ini))
@@ -2898,7 +2898,7 @@ PHP_FUNCTION(libvirt_image_remove)
     char name[1024];
     char msg[4096] = { 0 };
     char *image = NULL;
-    int image_len;
+    strsize_t image_len;
 
     GET_CONNECTION_FROM_ARGS("rs",&zconn,&image,&image_len);
 
@@ -3020,8 +3020,8 @@ PHP_FUNCTION(libvirt_connect_get_all_domain_stats)
     php_libvirt_connection *conn = NULL;
     zval *zconn;
     int retval = -1;
-    long flags = 0;
-    long stats = 0;
+    zend_long flags = 0;
+    zend_long stats = 0;
     const char *name = NULL;
     int i;
     int j;
@@ -3960,7 +3960,7 @@ PHP_FUNCTION(libvirt_domain_set_max_memory)
 {
     php_libvirt_domain *domain = NULL;
     zval *zdomain;
-    long memory = 0;
+    zend_long memory = 0;
 
     GET_DOMAIN_FROM_ARGS ("rl", &zdomain, &memory);
 
@@ -3982,7 +3982,7 @@ PHP_FUNCTION(libvirt_domain_set_memory)
 {
     php_libvirt_domain *domain = NULL;
     zval *zdomain;
-    long memory = 0;
+    zend_long memory = 0;
 
     GET_DOMAIN_FROM_ARGS ("rl", &zdomain, &memory);
 
@@ -4005,8 +4005,8 @@ PHP_FUNCTION(libvirt_domain_set_memory_flags)
 {
     php_libvirt_domain *domain = NULL;
     zval *zdomain;
-    long memory = 0;
-    long flags = 0;
+    zend_long memory = 0;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS ("rl|l", &zdomain, &memory, &flags);
 
@@ -4075,10 +4075,10 @@ PHP_FUNCTION(libvirt_domain_get_metadata)
 {
     php_libvirt_domain *domain = NULL;
     zval *zdomain;
-    long type = 0;
-    long flags = 0;
+    zend_long type = 0;
+    zend_long flags = 0;
     char *uri = NULL;
-    int uri_len;
+    strsize_t uri_len;
     char *ret = NULL;
 
     GET_DOMAIN_FROM_ARGS ("rlsl", &zdomain, &type, &uri, &uri_len, &flags);
@@ -4117,12 +4117,12 @@ PHP_FUNCTION(libvirt_domain_set_metadata)
 {
     php_libvirt_domain *domain = NULL;
     zval *zdomain;
-    int metadata_len, key_len, uri_len;
+    strsize_t metadata_len, key_len, uri_len;
     char *metadata = NULL;
     char *key = NULL;
     char *uri = NULL;
-    long type = 0;
-    long flags = 0;
+    zend_long type = 0;
+    zend_long flags = 0;
     int rc;
 
     GET_DOMAIN_FROM_ARGS ("rlsssl", &zdomain, &type, &metadata, &metadata_len, &key, &key_len, &uri, &uri_len, &flags);
@@ -4165,7 +4165,7 @@ PHP_FUNCTION(libvirt_domain_lookup_by_name)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    int name_len;
+    strsize_t name_len;
     char *name=NULL;
     virDomainPtr domain=NULL;
     php_libvirt_domain *res_domain;
@@ -4200,7 +4200,7 @@ PHP_FUNCTION(libvirt_domain_lookup_by_uuid)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    int uuid_len;
+    strsize_t uuid_len;
     unsigned char *uuid=NULL;
     virDomainPtr domain=NULL;
     php_libvirt_domain *res_domain;
@@ -4239,10 +4239,10 @@ PHP_FUNCTION(libvirt_domain_qemu_agent_command)
        php_libvirt_domain *domain=NULL;
        zval *zdomain;
        const char *cmd;
-       int cmd_len;
+       strsize_t cmd_len;
        char *ret;
-       long timeout = -1;
-       long flags = 0;
+       zend_long timeout = -1;
+       zend_long flags = 0;
 
        GET_DOMAIN_FROM_ARGS("rs|ll", &zdomain, &cmd, &cmd_len, &timeout, &flags);
 
@@ -4264,7 +4264,7 @@ PHP_FUNCTION(libvirt_domain_lookup_by_uuid_string)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    int uuid_len;
+    strsize_t uuid_len;
     char *uuid=NULL;
     virDomainPtr domain=NULL;
     php_libvirt_domain *res_domain;
@@ -4506,7 +4506,7 @@ PHP_FUNCTION(libvirt_domain_lookup_by_id)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    long id;
+    zend_long id;
     virDomainPtr domain=NULL;
     php_libvirt_domain *res_domain;
 
@@ -4612,7 +4612,7 @@ PHP_FUNCTION(libvirt_domain_get_screenshot_api)
 {
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
-    long screen = 0;
+    zend_long screen = 0;
     int fd = -1;
     char file[] = "/tmp/libvirt-php-tmp-XXXXXX";
     virStreamPtr st = NULL;
@@ -4709,8 +4709,8 @@ PHP_FUNCTION(libvirt_domain_get_screenshot)
     char *xml = NULL;
     int port = -1;
     char *hostname = NULL;
-    int hostname_len;
-    long scancode = 10;
+    strsize_t hostname_len;
+    zend_long scancode = 10;
     const char *path;
     char *pathDup = NULL;
     char name[1024] = { 0 };
@@ -4845,7 +4845,7 @@ PHP_FUNCTION(libvirt_domain_get_screen_dimensions)
     char *tmp = NULL;
     char *xml = NULL;
     char *hostname = NULL;
-    int hostname_len;
+    strsize_t hostname_len;
     int ret;
     int width;
     int height;
@@ -4914,9 +4914,9 @@ PHP_FUNCTION(libvirt_domain_send_keys)
     char *tmp = NULL;
     char *xml = NULL;
     char *hostname = NULL;
-    int hostname_len;
+    strsize_t hostname_len;
     char *keys = NULL;
-    int keys_len;
+    strsize_t keys_len;
     int ret = 0;
 
     GET_DOMAIN_FROM_ARGS("rss",&zdomain, &hostname, &hostname_len, &keys, &keys_len);
@@ -4982,11 +4982,11 @@ PHP_FUNCTION(libvirt_domain_send_pointer_event)
     char *tmp = NULL;
     char *xml = NULL;
     char *hostname = NULL;
-    int hostname_len;
-    long pos_x = 0;
-    long pos_y = 0;
-    long clicked = 0;
-    int release = 1;
+    strsize_t hostname_len;
+    zend_long pos_x = 0;
+    zend_long pos_y = 0;
+    zend_long clicked = 0;
+    zend_bool release = 1;
     int ret;
 
     GET_DOMAIN_FROM_ARGS("rslll|b",&zdomain, &hostname, &hostname_len, &pos_x, &pos_y, &clicked, &release);
@@ -5125,7 +5125,7 @@ PHP_FUNCTION(libvirt_connect_get_capabilities)
     zval *zconn;
     char *caps;
     char *xpath = NULL;
-    int xpath_len;
+    strsize_t xpath_len;
     char *tmp = NULL;
     int retval = -1;
 
@@ -5159,7 +5159,7 @@ PHP_FUNCTION(libvirt_connect_get_emulator)
     php_libvirt_connection *conn=NULL;
     zval *zconn;
     char *arch = NULL;
-    int arch_len;
+    strsize_t arch_len;
     char *tmp;
 
     GET_CONNECTION_FROM_ARGS("r|s",&zconn,&arch,&arch_len);
@@ -5190,7 +5190,7 @@ PHP_FUNCTION(libvirt_connect_get_nic_models)
     php_libvirt_connection *conn=NULL;
     zval *zconn;
     char *arch = NULL;
-    int arch_len;
+    strsize_t arch_len;
     char *tmp;
 
     GET_CONNECTION_FROM_ARGS("r|s",&zconn,&arch,&arch_len);
@@ -5261,9 +5261,9 @@ PHP_FUNCTION(libvirt_connect_get_soundhw_models)
     php_libvirt_connection *conn=NULL;
     zval *zconn;
     char *arch = NULL;
-    int arch_len;
+    strsize_t arch_len;
     char *tmp;
-    long flags = 0;
+    zend_long flags = 0;
 
     GET_CONNECTION_FROM_ARGS("r|sl",&zconn,&arch,&arch_len,&flags);
 
@@ -5478,19 +5478,19 @@ PHP_FUNCTION(libvirt_domain_new)
     virDomainPtr domain=NULL;
     zval *zconn;
     char *arch = NULL;
-    int arch_len;
+    strsize_t arch_len;
     char *tmp;
     char *name;
-    int name_len=0;
+    strsize_t name_len=0;
     // char *emulator;
     char *iso_image = NULL;
-    int iso_image_len;
-    long vcpus = -1;
-    long memMB = -1;
+    strsize_t iso_image_len;
+    zend_long vcpus = -1;
+    zend_long memMB = -1;
     zval *disks, *networks;
     tVMDisk *vmDisks = NULL;
     tVMNetwork *vmNetworks = NULL;
-    long maxmemMB = -1;
+    zend_long maxmemMB = -1;
     HashTable *arr_hash;
     int numDisks, numNets, i;
 #if PHP_MAJOR_VERSION >= 7
@@ -5504,7 +5504,7 @@ PHP_FUNCTION(libvirt_domain_new)
     char *xml = NULL;
     int retval = 0;
     char *uuid = NULL;
-    long flags = 0;
+    zend_long flags = 0;
     int fd = -1;
 
     GET_CONNECTION_FROM_ARGS("rsslllsaa|l",&zconn,&name,&name_len,&arch,&arch_len,&memMB,&maxmemMB,&vcpus,&iso_image,&iso_image_len,&disks,&networks,&flags);
@@ -5691,8 +5691,8 @@ PHP_FUNCTION(libvirt_domain_get_xml_desc)
     char *tmp = NULL;
     char *xml;
     char *xpath = NULL;
-    int xpath_len;
-    long flags=0;
+    strsize_t xpath_len;
+    zend_long flags=0;
     int retval = -1;
 
     GET_DOMAIN_FROM_ARGS("rs|l",&zdomain,&xpath,&xpath_len,&flags);
@@ -5799,7 +5799,7 @@ PHP_FUNCTION(libvirt_domain_get_interface_devices)
  */
 PHP_FUNCTION(libvirt_domain_change_vcpus)
 {
-    long numCpus, flags = 0;
+    zend_long numCpus, flags = 0;
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
 
@@ -5834,9 +5834,9 @@ PHP_FUNCTION(libvirt_domain_change_memory)
     char *new_xml = NULL;
     int new_len;
     char *newXml = NULL;
-    long xflags = 0;
-    long allocMem = 0;
-    long allocMax = 0;
+    zend_long xflags = 0;
+    zend_long allocMem = 0;
+    zend_long allocMax = 0;
     // int pos = -1;
     int len = 0;
     php_libvirt_domain *res_domain = NULL;
@@ -5919,11 +5919,11 @@ PHP_FUNCTION(libvirt_domain_change_boot_devices)
     char *new_xml = NULL;
     int new_len;
     char newXml[4096] = { 0 };
-    long xflags = 0;
+    zend_long xflags = 0;
     char *first = NULL;
-    int first_len;
+    strsize_t first_len;
     char *second = NULL;
-    int second_len;
+    strsize_t second_len;
     // int pos = -1;
     int len = 0;
     php_libvirt_domain *res_domain = NULL;
@@ -6001,15 +6001,15 @@ PHP_FUNCTION(libvirt_domain_disk_add)
     zval *zdomain;
     char *xml;
     char *img = NULL;
-    int img_len;
+    strsize_t img_len;
     char *dev = NULL;
-    int dev_len;
+    strsize_t dev_len;
     char *driver = NULL;
-    int driver_len;
+    strsize_t driver_len;
     char *typ = NULL;
-    int typ_len;
+    strsize_t typ_len;
     char *newXml = NULL;
-    long xflags = 0;
+    zend_long xflags = 0;
     int retval = -1;
     char *xpath = NULL;
     char *tmp = NULL;
@@ -6097,9 +6097,9 @@ PHP_FUNCTION(libvirt_domain_disk_remove)
     zval *zdomain;
     char *xml;
     char *dev = NULL;
-    int dev_len;
+    strsize_t dev_len;
     char *newXml = NULL;
-    long xflags = 0;
+    zend_long xflags = 0;
     int retval = -1;
     char *xpath = NULL;
     char *tmp = NULL;
@@ -6170,13 +6170,13 @@ PHP_FUNCTION(libvirt_domain_nic_add)
     zval *zdomain;
     char *xml;
     char *mac = NULL;
-    int mac_len;
+    strsize_t mac_len;
     char *net = NULL;
-    int net_len;
+    strsize_t net_len;
     char *model = NULL;
-    int model_len;
+    strsize_t model_len;
     char *newXml = NULL;
-    long xflags = 0;
+    zend_long xflags = 0;
     int retval = -1;
     char *xpath = NULL;
     char *tmp = NULL;
@@ -6263,9 +6263,9 @@ PHP_FUNCTION(libvirt_domain_nic_remove)
     zval *zdomain;
     char *xml;
     char *mac = NULL;
-    int mac_len;
+    strsize_t mac_len;
     char *newXml = NULL;
-    long xflags = 0;
+    zend_long xflags = 0;
     int retval = -1;
     char *xpath = NULL;
     char *tmp = NULL;
@@ -6423,7 +6423,7 @@ PHP_FUNCTION(libvirt_domain_core_dump)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     int retval;
-    int to_len;
+    strsize_t to_len;
     char *to;
 
     GET_DOMAIN_FROM_ARGS("rs",&zdomain,&to,&to_len);
@@ -6530,7 +6530,7 @@ PHP_FUNCTION(libvirt_domain_reboot)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     int retval;
-    long flags=0;
+    zend_long flags=0;
 
     GET_DOMAIN_FROM_ARGS("r|l",&zdomain,&flags);
 
@@ -6555,7 +6555,7 @@ PHP_FUNCTION(libvirt_domain_define_xml)
     zval *zconn;
     virDomainPtr domain=NULL;
     char *xml;
-    int xml_len;
+    strsize_t xml_len;
 
     GET_CONNECTION_FROM_ARGS("rs",&zconn,&xml,&xml_len);
 
@@ -6590,8 +6590,8 @@ PHP_FUNCTION(libvirt_domain_create_xml)
     zval *zconn;
     virDomainPtr domain=NULL;
     char *xml;
-    int xml_len;
-    long flags=0;
+    strsize_t xml_len;
+    zend_long flags=0;
 
     GET_CONNECTION_FROM_ARGS("rs|l", &zconn, &xml, &xml_len, &flags);
 
@@ -6627,9 +6627,9 @@ PHP_FUNCTION(libvirt_domain_memory_peek)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     int retval;
-    long flags=0;
-    long start;
-    long size;
+    zend_long flags=0;
+    zend_long start;
+    zend_long size;
     char *buff;
 
     GET_DOMAIN_FROM_ARGS("rlll",&zdomain,&start,&size,&flags);
@@ -6657,7 +6657,7 @@ PHP_FUNCTION(libvirt_domain_memory_stats)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     int retval;
-    long flags=0;
+    zend_long flags=0;
     int i;
     struct _virDomainMemoryStat stats[VIR_DOMAIN_MEMORY_STAT_NR];
 
@@ -6689,8 +6689,8 @@ PHP_FUNCTION(libvirt_domain_update_device)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     char *xml;
-    int xml_len;
-    long flags;
+    strsize_t xml_len;
+    zend_long flags;
     int res;
 
     GET_DOMAIN_FROM_ARGS("rsl",&zdomain,&xml,&xml_len,&flags);
@@ -6717,7 +6717,7 @@ PHP_FUNCTION(libvirt_domain_block_stats)
     zval *zdomain;
     int retval;
     char *path;
-    int path_len;
+    strsize_t path_len;
 
     struct _virDomainBlockStats stats;
 
@@ -6752,9 +6752,9 @@ PHP_FUNCTION(libvirt_domain_block_resize)
     zval *zdomain;
     int retval;
     char *path;
-    int path_len;
-    long size = 0;
-    long flags = 0;
+    strsize_t path_len;
+    zend_long size = 0;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS("rsl|l",&zdomain, &path, &path_len, &size, &flags);
 
@@ -6846,8 +6846,8 @@ PHP_FUNCTION(libvirt_domain_block_job_abort)
     zval *zdomain;
     int retval;
     char *path;
-    int path_len;
-    long flags = 0;
+    strsize_t path_len;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS("rs|l",&zdomain, &path, &path_len, &flags);
 
@@ -6873,9 +6873,9 @@ PHP_FUNCTION(libvirt_domain_block_job_set_speed)
     zval *zdomain;
     int retval;
     char *path;
-    int path_len;
-    long bandwidth = 0;
-    long flags = 0;
+    strsize_t path_len;
+    zend_long bandwidth = 0;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS("rsl|l",&zdomain, &path, &path_len, &bandwidth, &flags);
 
@@ -6903,7 +6903,7 @@ PHP_FUNCTION(libvirt_domain_get_network_info)
     char *mac;
     char *xml;
     char *tmp = NULL;
-    int mac_len;
+    strsize_t mac_len;
     char *xpath = NULL;
 
     GET_DOMAIN_FROM_ARGS("rs",&zdomain,&mac,&mac_len);
@@ -6976,7 +6976,8 @@ PHP_FUNCTION(libvirt_domain_get_block_info)
     char *dev;
     char *xml;
     char *tmp = NULL;
-    int dev_len, isFile;
+    strsize_t dev_len;
+    int isFile;
     char *xpath = NULL;
 
     struct _virDomainBlockInfo info;
@@ -7079,7 +7080,8 @@ PHP_FUNCTION(libvirt_domain_xml_xpath)
     zval *zpath;
     char *xml;
     char *tmp = NULL;
-    long path_len=-1, flags = 0;
+    strsize_t path_len = -1;
+    zend_long flags = 0;
     int rc = 0;
 
     GET_DOMAIN_FROM_ARGS("rs|l",&zdomain, &zpath, &path_len, &flags);
@@ -7120,7 +7122,7 @@ PHP_FUNCTION(libvirt_domain_interface_stats)
     zval *zdomain;
     int retval;
     char *path;
-    int path_len;
+    strsize_t path_len;
 
     struct _virDomainInterfaceStats stats;
 
@@ -7186,10 +7188,10 @@ PHP_FUNCTION(libvirt_domain_migrate_to_uri)
     int retval;
     long flags=0;
     char *duri;
-    int duri_len;
+    strsize_t duri_len;
     char *dname;
-    int dname_len;
-    long bandwidth;
+    strsize_t dname_len;
+    zend_long bandwidth;
 
     dname=NULL;
     dname_len=0;
@@ -7222,15 +7224,15 @@ PHP_FUNCTION(libvirt_domain_migrate_to_uri2)
     zval *zdomain;
     int retval;
     char *dconnuri;
-    int dconnuri_len;
+    strsize_t dconnuri_len;
     char *miguri;
-    int miguri_len;
+    strsize_t miguri_len;
     char *dxml;
-    int dxml_len;
-    long flags=0;
+    strsize_t dxml_len;
+    zend_long flags=0;
     char *dname;
-    int dname_len;
-    long bandwidth;
+    strsize_t dname_len;
+    zend_long bandwidth;
 
     dconnuri=NULL;
     dconnuri_len=0;
@@ -7276,10 +7278,10 @@ PHP_FUNCTION(libvirt_domain_migrate)
     virDomainPtr destdomain=NULL;
     php_libvirt_domain *res_domain;
 
-    long flags=0;
+    zend_long flags=0;
     char *dname;
-    int dname_len;
-    long bandwidth;
+    strsize_t dname_len;
+    zend_long bandwidth;
 
     dname=NULL;
     dname_len=0;
@@ -7363,7 +7365,7 @@ PHP_FUNCTION(libvirt_domain_has_current_snapshot)
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
     int retval;
-    long flags = 0;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS("r|l",&zdomain, &flags);
 
@@ -7385,9 +7387,9 @@ PHP_FUNCTION(libvirt_domain_snapshot_lookup_by_name)
 {
     php_libvirt_domain *domain=NULL;
     zval *zdomain;
-    int name_len;
+    strsize_t name_len;
     char *name=NULL;
-    long flags = 0;
+    zend_long flags = 0;
     php_libvirt_snapshot *res_snapshot;
     virDomainSnapshotPtr snapshot = NULL;
 
@@ -7424,7 +7426,7 @@ PHP_FUNCTION(libvirt_domain_snapshot_create)
     php_libvirt_snapshot *res_snapshot;
     zval *zdomain;
     virDomainSnapshotPtr snapshot = NULL;
-    long flags = 0;
+    zend_long flags = 0;
 
     GET_DOMAIN_FROM_ARGS("r|l",&zdomain, &flags);
 
@@ -7458,7 +7460,7 @@ PHP_FUNCTION(libvirt_domain_snapshot_get_xml)
     char *xml;
     zval *zsnapshot;
     php_libvirt_snapshot *snapshot;
-    long flags = 0;
+    zend_long flags = 0;
 
     GET_SNAPSHOT_FROM_ARGS("r|l",&zsnapshot, &flags);
 
@@ -7482,7 +7484,7 @@ PHP_FUNCTION(libvirt_domain_snapshot_revert)
     zval *zsnapshot;
     php_libvirt_snapshot *snapshot;
     int ret;
-    long flags = 0;
+    zend_long flags = 0;
 
     GET_SNAPSHOT_FROM_ARGS("r|l",&zsnapshot, &flags);
 
@@ -7504,7 +7506,7 @@ PHP_FUNCTION(libvirt_domain_snapshot_delete)
 {
     zval *zsnapshot;
     php_libvirt_snapshot *snapshot;
-    long flags = 0;
+    zend_long flags = 0;
     int retval;
 
     GET_SNAPSHOT_FROM_ARGS("r|l",&zsnapshot, &flags);
@@ -7530,7 +7532,7 @@ PHP_FUNCTION(libvirt_list_domain_snapshots)
     int count=-1;
     int expectedcount=-1;
     char **names;
-    long flags = 0;
+    zend_long flags = 0;
     int i;
 
     GET_DOMAIN_FROM_ARGS("r|l",&zdomain, &flags);
@@ -7570,7 +7572,7 @@ PHP_FUNCTION(libvirt_storagepool_lookup_by_name)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    int name_len;
+    strsize_t name_len;
     char *name=NULL;
     virStoragePoolPtr pool=NULL;
     php_libvirt_storagepool *res_pool;
@@ -7712,7 +7714,7 @@ PHP_FUNCTION(libvirt_storagevolume_lookup_by_name)
     php_libvirt_storagepool *pool=NULL;
     php_libvirt_volume *res_volume;
     zval *zpool;
-    int name_len;
+    strsize_t name_len;
     char *name=NULL;
     virStorageVolPtr volume=NULL;
 
@@ -7749,7 +7751,7 @@ PHP_FUNCTION(libvirt_storagevolume_lookup_by_path)
     php_libvirt_connection *conn=NULL;
     php_libvirt_volume *res_volume;
     zval *zconn;
-    int name_len;
+    strsize_t name_len;
     char *name=NULL;
     virStorageVolPtr volume=NULL;
 
@@ -7864,8 +7866,8 @@ PHP_FUNCTION(libvirt_storagevolume_get_xml_desc)
     char *tmp = NULL;
     char *xml;
     char *xpath = NULL;
-    int xpath_len;
-    long flags=0;
+    strsize_t xpath_len;
+    zend_long flags=0;
     int retval = -1;
 
     GET_VOLUME_FROM_ARGS("rs|l",&zvolume,&xpath,&xpath_len,&flags);
@@ -7907,8 +7909,8 @@ PHP_FUNCTION(libvirt_storagevolume_create_xml)
     zval *zpool;
     virStorageVolPtr volume=NULL;
     char *xml;
-    long flags = 0;
-    int xml_len;
+    zend_long flags = 0;
+    strsize_t xml_len;
 
     GET_STORAGEPOOL_FROM_ARGS("rs|l",&zpool,&xml,&xml_len, &flags);
 
@@ -7992,7 +7994,7 @@ PHP_FUNCTION(libvirt_storagevolume_delete)
 {
     php_libvirt_volume *volume=NULL;
     zval *zvolume;
-    long flags = 0;
+    zend_long flags = 0;
     int retval = 0;
 
     GET_VOLUME_FROM_ARGS("r|l",&zvolume,&flags);
@@ -8020,8 +8022,8 @@ PHP_FUNCTION(libvirt_storagevolume_resize)
 {
     php_libvirt_volume *volume=NULL;
     zval *zvolume;
-    long flags = 0;
-    long capacity = 0;
+    zend_long flags = 0;
+    zend_long capacity = 0;
     int retval = -1;
 
     GET_VOLUME_FROM_ARGS("rl|l", &zvolume, &capacity, &flags);
@@ -8184,7 +8186,7 @@ PHP_FUNCTION(libvirt_storagepool_lookup_by_uuid_string)
     php_libvirt_connection *conn = NULL;
     zval *zconn;
     char *uuid = NULL;
-    int uuid_len;
+    strsize_t uuid_len;
     virStoragePoolPtr storage=NULL;
     php_libvirt_storagepool *res_pool;
 
@@ -8226,8 +8228,8 @@ PHP_FUNCTION(libvirt_storagepool_get_xml_desc)
     char *xml;
     char *xpath = NULL;
     char *tmp = NULL;
-    long flags = 0;
-    int xpath_len;
+    zend_long flags = 0;
+    strsize_t xpath_len;
     int retval = -1;
 
     GET_STORAGEPOOL_FROM_ARGS("r|s", &zpool, &xpath, &xpath_len, &flags);
@@ -8270,8 +8272,8 @@ PHP_FUNCTION(libvirt_storagepool_define_xml)
     zval *zconn;
     virStoragePoolPtr pool = NULL;
     char *xml;
-    int xml_len;
-    long flags = 0;
+    strsize_t xml_len;
+    zend_long flags = 0;
 
 
     GET_CONNECTION_FROM_ARGS ("rs|l", &zconn, &xml, &xml_len, &flags);
@@ -8407,7 +8409,7 @@ PHP_FUNCTION(libvirt_storagepool_refresh)
 {
     php_libvirt_storagepool *pool = NULL;
     zval *zpool;
-    long flags = 0;
+    zend_long flags = 0;
     int retval;
 
     GET_STORAGEPOOL_FROM_ARGS ("r|l", &zpool, &flags);
@@ -8972,7 +8974,7 @@ PHP_FUNCTION(libvirt_list_networks)
 {
     php_libvirt_connection *conn=NULL;
     zval *zconn;
-    long flags = VIR_NETWORKS_ACTIVE | VIR_NETWORKS_INACTIVE;
+    zend_long flags = VIR_NETWORKS_ACTIVE | VIR_NETWORKS_INACTIVE;
     int count=-1;
     int expectedcount=-1;
     char **names;
@@ -9044,7 +9046,8 @@ PHP_FUNCTION(libvirt_list_nodedevs)
     int expectedcount=-1;
     char *cap = NULL;
     char **names;
-    int i, cap_len;
+    int i;
+    strsize_t cap_len;
 
     GET_CONNECTION_FROM_ARGS("r|s",&zconn,&cap,&cap_len);
 
@@ -9084,7 +9087,7 @@ PHP_FUNCTION(libvirt_nodedev_get)
     virNodeDevice *dev;
     zval *zconn;
     char *name;
-    int name_len;
+    strsize_t name_len;
 
     GET_CONNECTION_FROM_ARGS("rs",&zconn,&name,&name_len);
 
@@ -9155,7 +9158,7 @@ PHP_FUNCTION(libvirt_nodedev_get_xml_desc)
     char *tmp = NULL;
     char *xml = NULL;
     char *xpath = NULL;
-    int xpath_len;
+    strsize_t xpath_len;
     int retval = -1;
 
     GET_NODEDEV_FROM_ARGS("r|s",&znodedev,&xpath,&xpath_len);
@@ -9354,7 +9357,7 @@ PHP_FUNCTION(libvirt_network_define_xml)
     virNetwork *net;
     zval *zconn;
     char *xml = NULL;
-    int xml_len;
+    strsize_t xml_len;
 
     GET_CONNECTION_FROM_ARGS("rs",&zconn,&xml,&xml_len);
 
@@ -9411,7 +9414,7 @@ PHP_FUNCTION(libvirt_network_get)
     virNetwork *net;
     zval *zconn;
     char *name;
-    int name_len;
+    strsize_t name_len;
 
     GET_CONNECTION_FROM_ARGS("rs",&zconn,&name,&name_len);
 
@@ -9588,7 +9591,7 @@ PHP_FUNCTION(libvirt_network_set_active)
 {
     php_libvirt_network *network;
     zval *znetwork;
-    long act = 0;
+    zend_long act = 0;
 
     DPRINTF("%s: Setting network activity...\n", PHPFUNC);
 
@@ -9637,7 +9640,7 @@ PHP_FUNCTION(libvirt_network_get_xml_desc)
     char *xml = NULL;
     char *xpath = NULL;
     char *tmp;
-    int xpath_len;
+    strsize_t xpath_len;
     int retval = -1;
 
     GET_NETWORK_FROM_ARGS("r|s",&znetwork,&xpath,&xpath_len);
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]