com php-src: Use size_t everywhere instead: ext/opcac he/shared_alloc_shm.c ext/opcache/zend_shared_alloc .c ext/opcache/zend_shared_alloc.h
| From: | Rasmus Lerdorf | Date: | Wed, 29 May 2013 21:34:53 +0000 |
| Subject: | com php-src: Use size_t everywhere instead: ext/opcac he/shared_alloc_shm.c ext/opcache/zend_shared_alloc .c ext/opcache/zend_shared_alloc.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72258@lists.php.net to get a copy of this message | ||
Commit: 4c762152bf138d7f090699584ded3ceb519910bf
Author: Rasmus Lerdorf <rasmus@php.net> Wed, 29 May 2013 14:34:22 -0700
Parents: 29ee4b81f2a17943b677d9b6fb372ec36166984a
Branches: PHP-5.5
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4c762152bf138d7f090699584ded3ceb519910bf
Log:
Use size_t everywhere instead
Changed paths:
M ext/opcache/shared_alloc_shm.c
M ext/opcache/zend_shared_alloc.c
M ext/opcache/zend_shared_alloc.h
Diff:
diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c
index d53236b..a88cc2e 100644
--- a/ext/opcache/shared_alloc_shm.c
+++ b/ext/opcache/shared_alloc_shm.c
@@ -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;
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index 691c2a5..d752afe 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -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;
diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h
index 40f1f89..e94ecab 100644
--- a/ext/opcache/zend_shared_alloc.h
+++ b/ext/opcache/zend_shared_alloc.h
@@ -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 */