]> granicus.if.org Git - php/commitdiff
- Shift around header files.
authorAndi Gutmans <andi@php.net>
Sun, 5 Sep 1999 19:03:35 +0000 (19:03 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 5 Sep 1999 19:03:35 +0000 (19:03 +0000)
Zend/libzendts.dsp
Zend/zend.c
Zend/zend.h
Zend/zend_alloc.c
Zend/zend_alloc.h
Zend/zend_globals.h

index c3a0fcf3f37880cb50c52bbad17371ec9bc1cae2..282d50e2ba17b51868cfeffd4c136964d32c9c3a 100644 (file)
@@ -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
index 39d945e963fb327018efc785ca5f68fd41ac6abf..2e1fb09bd92650513e2033294283689a84e0ea7c 100644 (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;
index 32b3de9c0d91099c49be2c558e8a751b44dfcea0..c43c31805be5384f643367f39179ab30f02e7bcd 100644 (file)
@@ -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
 
index 6fdbf96a098acceb100e975db3af830c1fe2eb5e..29aa3bca6932ad436d920c0337ce9529d0a312b0 100644 (file)
@@ -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
index d6e2b3b80932ca7335491c3ed9adaa64065d0362..5eda4fd102085ff482b6a3381076f6d05056f6bb 100644 (file)
@@ -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
index 10d1861c9c11b3fd866ad0f29f3043cfc3c8254a..a87c91216311f409c26696be317358acd3348acc 100644 (file)
 #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"