From ef216c21fdcf8e29499c84bba5b987aca62385f0 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 30 Nov 2013 14:59:18 +0100 Subject: started to fix ext/mysqlnd --- ext/mysqlnd/mysqlnd_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_alloc.c') diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 80e8156016..3d9f861e90 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -79,7 +79,7 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_emalloc_name); @@ -119,7 +119,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name); @@ -162,7 +162,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name); @@ -203,7 +203,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name); #if PHP_DEBUG @@ -246,7 +246,7 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_erealloc_name); @@ -287,7 +287,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_perealloc_name); @@ -393,7 +393,7 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_malloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_malloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_malloc_name); @@ -432,7 +432,7 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_calloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_calloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_calloc_name); @@ -471,7 +471,7 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_realloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_realloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_realloc_name); -- cgit v1.2.1 From 2a468115e335679fabd565624e585588c040b5b8 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 9 Jan 2014 04:18:37 +0100 Subject: revamp mysqlnd, mysqli, mysql and pdo_mysql --- ext/mysqlnd/mysqlnd_alloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_alloc.c') diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 7f9ba76a67..b1fcdd4f59 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -157,7 +157,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) /* {{{ _mysqlnd_ecalloc */ -void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +void * _mysqlnd_ecalloc(php_uint_t nmemb, size_t size MYSQLND_MEM_D) { void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); @@ -198,7 +198,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_pecalloc */ -void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +void * _mysqlnd_pecalloc(php_uint_t nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) { void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); @@ -427,7 +427,7 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) /* {{{ _mysqlnd_calloc */ -void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +void * _mysqlnd_calloc(php_uint_t nmemb, size_t size MYSQLND_MEM_D) { void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); @@ -660,7 +660,7 @@ static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND /* {{{ mysqlnd_zend_mm_ecalloc */ -static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_ecalloc(php_uint_t nmemb, size_t size MYSQLND_MEM_D) { return ecalloc(nmemb, size); } @@ -668,7 +668,7 @@ static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_ME /* {{{ mysqlnd_zend_mm_pecalloc */ -static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_pecalloc(php_uint_t nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) { return pecalloc(nmemb, size, persistent); } @@ -716,7 +716,7 @@ static void * mysqlnd_zend_mm_malloc(size_t size MYSQLND_MEM_D) /* {{{ mysqlnd_zend_mm_calloc */ -static void * mysqlnd_zend_mm_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +static void * mysqlnd_zend_mm_calloc(php_uint_t nmemb, size_t size MYSQLND_MEM_D) { return calloc(nmemb, size); } -- cgit v1.2.1 From bdbf47df181bdafc1b2bc2df1d23815f01510b88 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 16:51:06 +0200 Subject: ported mysql and mysqlnd --- ext/mysqlnd/mysqlnd_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_alloc.c') diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index c3228aa4f1..903753ef89 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -79,7 +79,7 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_emalloc_name); @@ -119,7 +119,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name); @@ -162,7 +162,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name); @@ -203,7 +203,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name); #if PHP_DEBUG @@ -246,7 +246,7 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_erealloc_name); @@ -287,7 +287,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - long * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); + php_int_t * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_perealloc_name); @@ -393,7 +393,7 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_malloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_malloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_malloc_name); @@ -432,7 +432,7 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_calloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_calloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_calloc_name); @@ -471,7 +471,7 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - long * threshold = &MYSQLND_G(debug_realloc_fail_threshold); + php_int_t * threshold = &MYSQLND_G(debug_realloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_realloc_name); -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- ext/mysqlnd/mysqlnd_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_alloc.c') diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 903753ef89..9cc46dba4a 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -79,7 +79,7 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_emalloc_name); @@ -119,7 +119,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); + zend_long * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name); @@ -162,7 +162,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name); @@ -203,7 +203,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); + zend_long * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name); #if PHP_DEBUG @@ -246,7 +246,7 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_erealloc_name); @@ -287,7 +287,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; #if PHP_DEBUG - php_int_t * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); + zend_long * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_perealloc_name); @@ -393,7 +393,7 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_malloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_malloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_malloc_name); @@ -432,7 +432,7 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_calloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_calloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_calloc_name); @@ -471,7 +471,7 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) void *ret; zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); #if PHP_DEBUG - php_int_t * threshold = &MYSQLND_G(debug_realloc_fail_threshold); + zend_long * threshold = &MYSQLND_G(debug_realloc_fail_threshold); #endif TRACE_ALLOC_ENTER(mysqlnd_realloc_name); -- cgit v1.2.1