mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
- Shift around header files.
This commit is contained in:
parent
5bcc067687
commit
99947a251e
@ -226,6 +226,10 @@ SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -278,7 +278,7 @@ static void executor_globals_dtor(zend_executor_globals *executor_globals)
|
||||
|
||||
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
{
|
||||
start_memory_manager();
|
||||
start_memory_manager(ALS_C);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -291,10 +291,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
|
||||
zend_executor_globals *executor_globals;
|
||||
|
||||
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), alloc_globals_ctor, NULL);
|
||||
#else
|
||||
start_memory_manager(ALS_C);
|
||||
#endif
|
||||
|
||||
start_memory_manager();
|
||||
|
||||
/* Set up utility functions and values */
|
||||
zend_error = utility_functions->error_function;
|
||||
zend_printf = utility_functions->printf_function;
|
||||
|
@ -90,7 +90,6 @@ typedef unsigned char zend_bool;
|
||||
#include "zend_hash.h"
|
||||
#include "zend_llist.h"
|
||||
|
||||
|
||||
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, HashTable *list, HashTable *plist, zval *this_ptr
|
||||
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, list, plist, this_ptr
|
||||
|
||||
|
@ -307,10 +307,8 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void start_memory_manager(void)
|
||||
ZEND_API void start_memory_manager(ALS_D)
|
||||
{
|
||||
ALS_FETCH();
|
||||
|
||||
AG(phead) = AG(head) = NULL;
|
||||
|
||||
#if MEMORY_LIMIT
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
|
||||
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
|
||||
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
|
||||
@ -101,7 +103,7 @@ ZEND_API void _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
|
||||
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
|
||||
|
||||
ZEND_API void start_memory_manager(void);
|
||||
ZEND_API void start_memory_manager(ALS_D);
|
||||
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);
|
||||
|
||||
#if ZEND_DEBUG
|
||||
|
@ -21,8 +21,11 @@
|
||||
#ifndef _T_GLOBALS_H
|
||||
#define _T_GLOBALS_H
|
||||
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "zend_globals_macros.h"
|
||||
|
||||
#include "zend_stack.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
#include "zend_hash.h"
|
||||
@ -46,74 +49,9 @@ END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _zend_compiler_globals zend_compiler_globals;
|
||||
typedef struct _zend_executor_globals zend_executor_globals;
|
||||
typedef struct _zend_alloc_globals zend_alloc_globals;
|
||||
|
||||
#define SYMTABLE_CACHE_SIZE 32
|
||||
|
||||
|
||||
/* Compiler */
|
||||
#ifdef ZTS
|
||||
# define CLS_D zend_compiler_globals *compiler_globals
|
||||
# define CLS_DC , CLS_D
|
||||
# define CLS_C compiler_globals
|
||||
# define CLS_CC , CLS_C
|
||||
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
|
||||
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
|
||||
# define YYPARSE_PARAM compiler_globals
|
||||
# define YYLEX_PARAM compiler_globals
|
||||
BEGIN_EXTERN_C()
|
||||
int zendparse(void *compiler_globals);
|
||||
END_EXTERN_C()
|
||||
#else
|
||||
# define CLS_D
|
||||
# define CLS_DC
|
||||
# define CLS_C
|
||||
# define CLS_CC
|
||||
# define CG(v) (compiler_globals.v)
|
||||
# define CLS_FETCH()
|
||||
extern ZEND_API struct _zend_compiler_globals compiler_globals;
|
||||
int zendparse();
|
||||
#endif
|
||||
|
||||
|
||||
/* Executor */
|
||||
#ifdef ZTS
|
||||
# define ELS_D zend_executor_globals *executor_globals
|
||||
# define ELS_DC , ELS_D
|
||||
# define ELS_C executor_globals
|
||||
# define ELS_CC , ELS_C
|
||||
# define EG(v) (executor_globals->v)
|
||||
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
|
||||
#else
|
||||
# define ELS_D
|
||||
# define ELS_DC
|
||||
# define ELS_C
|
||||
# define ELS_CC
|
||||
# define EG(v) (executor_globals.v)
|
||||
# define ELS_FETCH()
|
||||
extern ZEND_API zend_executor_globals executor_globals;
|
||||
#endif
|
||||
|
||||
|
||||
/* Memory Manager */
|
||||
#ifdef ZTS
|
||||
# define ALS_D zend_alloc_globals *alloc_globals
|
||||
# define ALS_DC , ALS_D
|
||||
# define ALS_C alloc_globals
|
||||
# define ALS_CC , ALS_C
|
||||
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
|
||||
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
|
||||
#else
|
||||
# define ALS_D
|
||||
# define ALS_DC
|
||||
# define ALS_C
|
||||
# define ALS_CC
|
||||
# define AG(v) (alloc_globals.v)
|
||||
# define ALS_FETCH()
|
||||
#endif
|
||||
|
||||
#include "zend_compile.h"
|
||||
#include "zend_execute.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user