diff options
Diffstat (limited to 'sapi.h')
| -rw-r--r-- | sapi.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sapi.h b/sapi.h new file mode 100644 index 0000000000..de6af839d1 --- /dev/null +++ b/sapi.h @@ -0,0 +1,37 @@ +#ifndef _NEW_SAPI_H +#define _NEW_SAPI_H + +typedef struct { + int (*ub_write)(const char *str, unsigned int str_length); +} sapi_functions_struct; + +extern sapi_functions_struct sapi_functions; /* true global */ + + +typedef struct { + void *server_context; +} sapi_globals_struct; + + +void sapi_startup(); + +#ifdef ZTS +# define SLS_D sapi_globals_struct *sapi_globals +# define SLS_DC , SLS_D +# define SLS_C sapi_globals +# define SLS_CC , SLS_C +# define SG(v) (sapi_globals->v) +# define SLS_FETCH() sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id) +extern int sapi_globals_id; +#else +# define SLS_D +# define SLS_DC +# define SLS_C +# define SLS_CC +# define SG(v) (sapi_globals.v) +# define SLS_FETCH() +extern ZEND_API sapi_globals_struct sapi_globals; +#endif + + +#endif /* _NEW_SAPI_H */
\ No newline at end of file |
