From: Remi Collet <fedora(a)famillecollet.com>
---
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 f4f9c5f..2700c77 100644
--- a/src/libvirt-php.c
+++ b/src/libvirt-php.c
@@ -2248,7 +2248,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;
@@ -2349,7 +2349,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;
@@ -2799,12 +2799,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))
@@ -2867,7 +2867,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);
@@ -2989,8 +2989,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;
@@ -3929,7 +3929,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);
@@ -3951,7 +3951,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);
@@ -3974,8 +3974,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);
@@ -4044,10 +4044,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);
@@ -4086,12 +4086,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);
@@ -4134,7 +4134,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;
@@ -4169,7 +4169,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;
@@ -4208,10 +4208,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);
@@ -4233,7 +4233,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;
@@ -4475,7 +4475,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;
@@ -4581,7 +4581,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;
@@ -4678,8 +4678,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 };
@@ -4814,7 +4814,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;
@@ -4883,9 +4883,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);
@@ -4951,11 +4951,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);
@@ -5094,7 +5094,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;
@@ -5128,7 +5128,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);
@@ -5159,7 +5159,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);
@@ -5230,9 +5230,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);
@@ -5447,19 +5447,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
@@ -5473,7 +5473,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);
@@ -5660,8 +5660,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);
@@ -5768,7 +5768,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;
@@ -5803,9 +5803,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;
@@ -5888,11 +5888,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;
@@ -5970,15 +5970,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;
@@ -6066,9 +6066,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;
@@ -6139,13 +6139,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;
@@ -6232,9 +6232,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;
@@ -6392,7 +6392,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);
@@ -6499,7 +6499,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);
@@ -6524,7 +6524,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);
@@ -6559,8 +6559,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);
@@ -6596,9 +6596,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);
@@ -6626,7 +6626,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];
@@ -6658,8 +6658,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);
@@ -6686,7 +6686,7 @@ PHP_FUNCTION(libvirt_domain_block_stats)
zval *zdomain;
int retval;
char *path;
- int path_len;
+ strsize_t path_len;
struct _virDomainBlockStats stats;
@@ -6721,9 +6721,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);
@@ -6748,8 +6748,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);
@@ -6775,9 +6775,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);
@@ -6805,7 +6805,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);
@@ -6878,7 +6878,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;
@@ -6981,7 +6982,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);
@@ -7022,7 +7024,7 @@ PHP_FUNCTION(libvirt_domain_interface_stats)
zval *zdomain;
int retval;
char *path;
- int path_len;
+ strsize_t path_len;
struct _virDomainInterfaceStats stats;
@@ -7088,10 +7090,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;
@@ -7124,15 +7126,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;
@@ -7178,10 +7180,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;
@@ -7265,7 +7267,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);
@@ -7287,9 +7289,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;
@@ -7326,7 +7328,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);
@@ -7360,7 +7362,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);
@@ -7384,7 +7386,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);
@@ -7406,7 +7408,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);
@@ -7432,7 +7434,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);
@@ -7472,7 +7474,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;
@@ -7612,7 +7614,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;
@@ -7649,7 +7651,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;
@@ -7764,8 +7766,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);
@@ -7807,8 +7809,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);
@@ -7892,7 +7894,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);
@@ -7920,8 +7922,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);
@@ -8084,7 +8086,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;
@@ -8126,8 +8128,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);
@@ -8170,8 +8172,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);
@@ -8307,7 +8309,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);
@@ -8859,7 +8861,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;
@@ -8928,7 +8930,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);
@@ -8967,7 +8970,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);
@@ -9037,7 +9040,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);
@@ -9236,7 +9239,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);
@@ -9293,7 +9296,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);
@@ -9470,7 +9473,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);
@@ -9519,7 +9522,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