[PHP-DEV] CVS update: php31/main From: shane (php-dev <email protected>)
Date: 05/30/98

Date: Saturday May 30, 1998 @ 20:48
Author: shane

Update of /repository/php31/main
In directory asf:/tmp/cvs-serv14174/main

Modified Files:
        main.c php.h tls.h
Log Message:
minor rearangement of flex YY_TLS_VARS.

Index: php31/main/main.c
diff -c php31/main/main.c:1.12 php31/main/main.c:1.13
*** php31/main/main.c:1.12 Sat May 30 20:32:03 1998
--- php31/main/main.c Sat May 30 20:48:53 1998
***************
*** 29,35 ****
     +----------------------------------------------------------------------+
   */
  
! /* $Id: main.c,v 1.12 1998/05/31 00:32:03 shane Exp $ */
  
  /* #define CRASH_DETECTION */
  
--- 29,35 ----
     +----------------------------------------------------------------------+
   */
  
! /* $Id: main.c,v 1.13 1998/05/31 00:48:53 shane Exp $ */
  
  /* #define CRASH_DETECTION */
  
***************
*** 2380,2386 ****
  {
          FILE *in = NULL;
          int c;
! // YY_TLS_VARS;
          php3_globals_struct *php3_globals;
  #if DODEBUGGER
          msvc5_debug("%d:main entered\n",GetCurrentThreadId());
--- 2380,2388 ----
  {
          FILE *in = NULL;
          int c;
!
! #if THREAD_SAFE
! flex_globals *php_gbl;
          php3_globals_struct *php3_globals;
  #if DODEBUGGER
          msvc5_debug("%d:main entered\n",GetCurrentThreadId());
***************
*** 2398,2403 ****
--- 2400,2408 ----
                  sapi_info->puts(sapi_info->scid,"IIS Internal Error: Thread not initialized!");
                  return SUCCESS;
          }
+ PHP3_TLS_GET(phpLexTlsIndex,php_gbl);
+ #endif
+
          GLOBAL(php3_preprocess) = sapi_info->preprocess;
          GLOBAL(php3_display_source) = sapi_info->display_source_mode;
          GLOBAL(sapi_rqst) = sapi_info;
***************
*** 2498,2508 ****
                  pval yylval;
  
  #ifdef THREAD_SAFE
! //while (phplex(&yylval, php3_globals, php_gbl)); /* create the token cache */
  #else
! //while (phplex(&yylval)); /* create the token cache */
  #endif
! //tcm_save(&GLOBAL(token_cache_manager));
          }
  
          if (sapi_info->display_source_mode) {
--- 2503,2513 ----
                  pval yylval;
  
  #ifdef THREAD_SAFE
! while (phplex(&yylval, php3_globals, php_gbl)); /* create the token cache */
  #else
! while (phplex(&yylval)); /* create the token cache */
  #endif
! tcm_save(&GLOBAL(token_cache_manager));
          }
  
          if (sapi_info->display_source_mode) {
Index: php31/main/php.h
diff -c php31/main/php.h:1.9 php31/main/php.h:1.10
*** php31/main/php.h:1.9 Sat May 30 20:32:04 1998
--- php31/main/php.h Sat May 30 20:48:54 1998
***************
*** 28,34 ****
     +----------------------------------------------------------------------+
   */
  
! /* $Id: php.h,v 1.9 1998/05/31 00:32:04 shane Exp $ */
  
  #ifndef _PHP_H
  #define _PHP_H
--- 28,34 ----
     +----------------------------------------------------------------------+
   */
  
! /* $Id: php.h,v 1.10 1998/05/31 00:48:54 shane Exp $ */
  
  #ifndef _PHP_H
  #define _PHP_H
***************
*** 97,102 ****
--- 97,111 ----
  # define INLINE_TLS_VOID struct php3_global_struct *php3_globals
  # define _INLINE_TLS ,php3_globals
  # define _INLINE_TLS_VOID php3_globals
+ /* these are from the flex scanner */
+
+ # ifndef YY_TLS_VARS
+ # define phptext php_gbl->text
+ # define phpleng php_gbl->leng
+ extern DWORD phpLexTlsIndex;
+ # define YY_TLS_VARS flex_globals *PHP3_TLS_GET(phpLexTlsIndex,php_gbl)
+ # endif
+
  # endif
  
  #else /* non-thread safe compilation */
Index: php31/main/tls.h
diff -c php31/main/tls.h:1.8 php31/main/tls.h:1.9
*** php31/main/tls.h:1.8 Sat May 30 16:50:04 1998
--- php31/main/tls.h Sat May 30 20:48:54 1998
***************
*** 210,223 ****
  #ifdef THREAD_SAFE
  
  
- /* these are from the flex scanner */
- # ifndef YY_TLS_VARS
- # define phptext php_gbl->text
- # define phpleng php_gbl->leng
- extern DWORD phpLexTlsIndex;
- # define YY_TLS_VARS flex_globals *php_gbl = TlsGetValue(phpLexTlsIndex)
- # endif
-
  /* needed for control structure */
  extern int include_file(pval *file,int display_source);
  extern int conditional_include_file(pval *file, pval *return_offset INLINE_TLS);
--- 210,215 ----