/* Reset the scanner for scanning the new file */
yyin = tmp;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
- CG(zend_lineno) = 1;
BEGIN(INITIAL);
- zend_set_compiled_filename(file_handle->filename);
#else
ifstream *input_file = new ifstream(file_handle->filename);
CG(ZFL) = new ZendFlexLexer;
CG(ZFL)->switch_streams(input_file, &cout);
#endif
+ zend_set_compiled_filename(file_handle->filename);
+ CG(zend_lineno) = 1;
return SUCCESS;
}
END_EXTERN_C()
zend_executor_globals *executor_globals;
tsrm_startup(1,1,0);
- alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), NULL, NULL);
+ alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), alloc_globals_ctor, NULL);
#endif
start_memory_manager();
HANDLE_UNBLOCK_INTERRUPTIONS();
}
+
+#ifdef ZTS
+
+void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
+{
+ start_memory_manager();
+}
+
+
+#endif
/*
* Local variables:
* tab-width: 4
# 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)
+void alloc_globals_ctor(zend_alloc_globals *alloc_globals);
#else
# define ALS_D
# define ALS_DC
# define ALS_FETCH()
#endif
-
#include "zend_compile.h"
#include "zend_execute.h"