-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnode_php_embed.h
More file actions
38 lines (30 loc) · 1.08 KB
/
node_php_embed.h
File metadata and controls
38 lines (30 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Main entry point: this is the node module declaration, contains
// the PhpRequestWorker which shuttles messages between node and PHP,
// and contains the SAPI hooks to configure PHP to talk to node.
// Copyright (c) 2015 C. Scott Ananian <[email protected]>
#ifndef NODE_PHP_EMBED_NODE_PHP_EMBED_H_
#define NODE_PHP_EMBED_NODE_PHP_EMBED_H_
// This should match the version declared in package.json.
#define NODE_PHP_EMBED_VERSION "0.5.3-git"
extern "C" {
#include "TSRM/TSRM.h"
#include "Zend/zend_API.h"
}
namespace node_php_embed {
class PhpRequestWorker;
class MapperChannel;
}
/* Per-thread storage for the module */
ZEND_BEGIN_MODULE_GLOBALS(node_php_embed)
node_php_embed::PhpRequestWorker *worker;
node_php_embed::MapperChannel *channel;
ZEND_END_MODULE_GLOBALS(node_php_embed)
ZEND_EXTERN_MODULE_GLOBALS(node_php_embed);
#ifdef ZTS
# define NODE_PHP_EMBED_G(v) \
TSRMG(node_php_embed_globals_id, zend_node_php_embed_globals *, v)
#else
# define NODE_PHP_EMBED_G(v) \
(node_php_embed_globals.v)
#endif
#endif // NODE_PHP_EMBED_NODE_PHP_EMBED_H_