~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to sapi/embed/php_embed.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   +----------------------------------------------------------------------+
 
3
   | PHP Version 5                                                        |
 
4
   +----------------------------------------------------------------------+
 
5
   | Copyright (c) 1997-2004 The PHP Group                                |
 
6
   +----------------------------------------------------------------------+
 
7
   | This source file is subject to version 3.0 of the PHP license,       |
 
8
   | that is bundled with this package in the file LICENSE, and is        |
 
9
   | available through the world-wide-web at the following url:           |
 
10
   | http://www.php.net/license/3_0.txt.                                  |
 
11
   | If you did not receive a copy of the PHP license and are unable to   |
 
12
   | obtain it through the world-wide-web, please send a note to          |
 
13
   | license@php.net so we can mail you a copy immediately.               |
 
14
   +----------------------------------------------------------------------+
 
15
   | Author: Edin Kadribasic <edink@php.net>                              |
 
16
   +----------------------------------------------------------------------+
 
17
*/
 
18
/* $Id: php_embed.h,v 1.5 2004/01/08 17:33:24 sniper Exp $ */
 
19
 
 
20
#ifndef _PHP_EMBED_H_
 
21
#define _PHP_EMBED_H_
 
22
 
 
23
#include <main/php.h>
 
24
#include <main/SAPI.h>
 
25
#include <main/php_main.h>
 
26
#include <main/php_variables.h>
 
27
#include <main/php_ini.h>
 
28
#include <zend_ini.h>
 
29
 
 
30
#ifdef ZTS
 
31
#define PTSRMLS_D        void ****ptsrm_ls
 
32
#define PTSRMLS_DC       , PTSRMLS_D
 
33
#define PTSRMLS_C        &tsrm_ls
 
34
#define PTSRMLS_CC       , PTSRMLS_C
 
35
#else
 
36
#define PTSRMLS_D
 
37
#define PTSRMLS_DC
 
38
#define PTSRMLS_C
 
39
#define PTSRMLS_CC
 
40
#endif
 
41
 
 
42
#define PHP_EMBED_START_BLOCK(x,y) { \
 
43
    void ***tsrm_ls; \
 
44
    php_embed_init(x, y PTSRMLS_CC); \
 
45
    zend_first_try {
 
46
 
 
47
#define PHP_EMBED_END_BLOCK() \
 
48
  } zend_catch { \
 
49
    /* int exit_status = EG(exit_status); */ \
 
50
  } zend_end_try(); \
 
51
  php_embed_shutdown(TSRMLS_C); \
 
52
}
 
53
 
 
54
BEGIN_EXTERN_C() 
 
55
int php_embed_init(int argc, char **argv PTSRMLS_DC);
 
56
void php_embed_shutdown(TSRMLS_D);
 
57
extern sapi_module_struct php_embed_module;
 
58
END_EXTERN_C()
 
59
 
 
60
 
 
61
#endif /* _PHP_EMBED_H_ */