com php-src: Fixed phpdbg build: Zend/zend_alloc.c Zend/z end_alloc.h sapi/phpdbg/phpdbg_sigsafe.c sapi/phpdb g/phpdbg_sigsafe.h
| From: | Dmitry Stogov | Date: | Thu, 14 May 2015 13:47:22 +0000 |
| Subject: | com php-src: Fixed phpdbg build: Zend/zend_alloc.c Zend/z end_alloc.h sapi/phpdbg/phpdbg_sigsafe.c sapi/phpdb g/phpdbg_sigsafe.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86759@lists.php.net to get a copy of this message | ||
Commit: 0604df8a82084f2b7d4a46baf28edefa764c1dd2
Author: Dmitry Stogov <dmitry@zend.com> Thu, 14 May 2015 16:47:22 +0300
Parents: 8e9b4b5aa7219b05c9659f3db3ae6d7014984bc8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0604df8a82084f2b7d4a46baf28edefa764c1dd2
Log:
Fixed phpdbg build
Changed paths:
M Zend/zend_alloc.c
M Zend/zend_alloc.h
M sapi/phpdbg/phpdbg_sigsafe.c
M sapi/phpdbg/phpdbg_sigsafe.h
Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 108575f..8f88368 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2499,7 +2499,7 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
return zend_mm_init();
}
-ZEND_API zend_mm_heap *zend_mm_startup_ex(zend_mm_handlers *handlers, void *data, size_t data_size)
+ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void *data, size_t
data_size)
{
#if ZEND_MM_STORAGE
zend_mm_storage tmp_storage, *storage;
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index c415685..f76494e 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -310,7 +310,7 @@ struct _zend_mm_storage {
};
ZEND_API zend_mm_storage *zend_mm_get_storage(zend_mm_heap *heap);
-ZEND_API zend_mm_heap *zend_mm_startup_ex(zend_mm_handlers *handlers, void *data, size_t
data_size);
+ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void *data, size_t
data_size);
/*
diff --git a/sapi/phpdbg/phpdbg_sigsafe..c b/sapi/phpdbg/phpdbg_sigsafe.c
index ce32159..319c9a5 100644
--- a/sapi/phpdbg/phpdbg_sigsafe.c
+++ b/sapi/phpdbg/phpdbg_sigsafe.c
@@ -29,13 +29,17 @@ static void zend_mm_mem_free(zend_mm_storage *storage, void *ptr, size_t size) {
void phpdbg_set_sigsafe_mem(char *buffer) {
phpdbg_signal_safe_mem *mem = &PHPDBG_G(sigsafe_mem);
+ const zend_mm_handlers phpdbg_handlers = {
+ zend_mm_mem_alloc,
+ zend_mm_mem_free,
+ NULL,
+ NULL,
+ };
+
mem->mem = buffer;
mem->allocated = 0;
- mem->storage.chunk_alloc = zend_mm_mem_alloc;
- mem->storage.chunk_free = zend_mm_mem_free;
-
- mem->heap = zend_mm_startup_ex(&mem->storage);
+ mem->heap = zend_mm_startup_ex(&phpdbg_handlers, NULL, 0);
mem->old_heap = zend_mm_set_heap(mem->heap);
}
diff --git a/sapi/phpdbg/phpdbg_sigsafe.h b/sapi/phpdbg/phpdbg_sigsafe.h
index d8a195f..e5d0f34 100644
--- a/sapi/phpdbg/phpdbg_sigsafe.h
+++ b/sapi/phpdbg/phpdbg_sigsafe.h
@@ -13,7 +13,6 @@ typedef struct {
zend_bool allocated;
zend_mm_heap *heap;
zend_mm_heap *old_heap;
- zend_mm_storage storage;
} phpdbg_signal_safe_mem;
#include "phpdbg.h"