1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

sync libmbfl allocator with the size_t changes

This commit is contained in:
Anatol Belski
2017-07-22 23:53:00 +02:00
parent e0825ec60f
commit 61784bcb71
3 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -54,9 +54,9 @@
#include "mbfl_allocators.h"
static void *__mbfl__malloc(unsigned int);
static void *__mbfl__realloc(void *, unsigned int);
static void *__mbfl__calloc(unsigned int, unsigned int);
static void *__mbfl__malloc(size_t);
static void *__mbfl__realloc(void *, size_t);
static void *__mbfl__calloc(size_t, size_t);
static void __mbfl__free(void *);
static mbfl_allocators default_allocators = {
@@ -71,17 +71,17 @@ static mbfl_allocators default_allocators = {
mbfl_allocators *__mbfl_allocators = &default_allocators;
static void *__mbfl__malloc(unsigned int sz)
static void *__mbfl__malloc(size_t sz)
{
return malloc(sz);
}
static void *__mbfl__realloc(void *ptr, unsigned int sz)
static void *__mbfl__realloc(void *ptr, size_t sz)
{
return realloc(ptr, sz);
}
static void *__mbfl__calloc(unsigned int nelems, unsigned int szelem)
static void *__mbfl__calloc(size_t nelems, size_t szelem)
{
return calloc(nelems, szelem);
}
+5 -5
View File
@@ -34,12 +34,12 @@
#include "mbfl_defs.h"
typedef struct _mbfl_allocators {
void *(*malloc)(unsigned int);
void *(*realloc)(void *, unsigned int);
void *(*calloc)(unsigned int, unsigned int);
void *(*malloc)(size_t);
void *(*realloc)(void *, size_t);
void *(*calloc)(size_t, size_t);
void (*free)(void *);
void *(*pmalloc)(unsigned int);
void *(*prealloc)(void *, unsigned int);
void *(*pmalloc)(size_t);
void *(*prealloc)(void *, size_t);
void (*pfree)(void *);
} mbfl_allocators;
+5 -5
View File
@@ -654,17 +654,17 @@ static char *get_output_encoding(void) {
/* {{{ allocators */
static void *_php_mb_allocators_malloc(unsigned int sz)
static void *_php_mb_allocators_malloc(size_t sz)
{
return emalloc(sz);
}
static void *_php_mb_allocators_realloc(void *ptr, unsigned int sz)
static void *_php_mb_allocators_realloc(void *ptr, size_t sz)
{
return erealloc(ptr, sz);
}
static void *_php_mb_allocators_calloc(unsigned int nelems, unsigned int szelem)
static void *_php_mb_allocators_calloc(size_t nelems, size_t szelem)
{
return ecalloc(nelems, szelem);
}
@@ -674,12 +674,12 @@ static void _php_mb_allocators_free(void *ptr)
efree(ptr);
}
static void *_php_mb_allocators_pmalloc(unsigned int sz)
static void *_php_mb_allocators_pmalloc(size_t sz)
{
return pemalloc(sz, 1);
}
static void *_php_mb_allocators_prealloc(void *ptr, unsigned int sz)
static void *_php_mb_allocators_prealloc(void *ptr, size_t sz)
{
return perealloc(ptr, sz, 1);
}