]> granicus.if.org Git - php/commitdiff
Use size_t everywhere instead
authorRasmus Lerdorf <rasmus@php.net>
Wed, 29 May 2013 21:34:22 +0000 (14:34 -0700)
committerRasmus Lerdorf <rasmus@php.net>
Wed, 29 May 2013 21:34:53 +0000 (14:34 -0700)
ext/opcache/shared_alloc_shm.c
ext/opcache/zend_shared_alloc.c
ext/opcache/zend_shared_alloc.h

index d53236b3b028f868feabffa2f86a27622c575af1..a88cc2e19673abc364753261b52773aa112644a0 100644 (file)
@@ -54,7 +54,7 @@ typedef struct  {
 static int create_segments(size_t requested_size, zend_shared_segment_shm ***shared_segments_p, int *shared_segments_count, char **error_in)
 {
        int i;
-       unsigned int allocate_size = 0, remaining_bytes = requested_size, seg_allocate_size;
+       size_t allocate_size = 0, remaining_bytes = requested_size, seg_allocate_size;
        int first_segment_id = -1;
        key_t first_segment_key = -1;
        struct shmid_ds sds;
index 691c2a595a69bcf1692dcbcba8ed81c89cfadc6a..d752afea1c3b1b3c1c5720dbe3be6dff77f1ef6c 100644 (file)
@@ -119,7 +119,7 @@ static void copy_shared_segments(void *to, void *from, int count, int size)
        }
 }
 
-static int zend_shared_alloc_try(const zend_shared_memory_handler_entry *he, long requested_size, zend_shared_segment ***shared_segments_p, int *shared_segments_count, char **error_in)
+static int zend_shared_alloc_try(const zend_shared_memory_handler_entry *he, size_t requested_size, zend_shared_segment ***shared_segments_p, int *shared_segments_count, char **error_in)
 {
        int res;
        g_shared_alloc_handler = he->handler;
@@ -148,7 +148,7 @@ static int zend_shared_alloc_try(const zend_shared_memory_handler_entry *he, lon
        return ALLOC_FAILURE;
 }
 
-int zend_shared_alloc_startup(long requested_size)
+int zend_shared_alloc_startup(size_t requested_size)
 {
        zend_shared_segment **tmp_shared_segments;
        size_t shared_segments_array_size;
index 40f1f89ec0c653d0f27a264cc31626a1518118dd..e94ecab9b333f4a42d74a127700d82d78234d307 100644 (file)
@@ -117,7 +117,7 @@ extern zend_smm_shared_globals *smm_shared_globals;
 
 #define SHARED_ALLOC_REATTACHED                (SUCCESS+1)
 
-int zend_shared_alloc_startup(long requested_size);
+int zend_shared_alloc_startup(size_t requested_size);
 void zend_shared_alloc_shutdown(void);
 
 /* allocate shared memory block */