Skip to content
This repository
Newer
Older
100644 85 lines (70 sloc) 2.753 kb
2c6284c2 »
2009-07-06 initial checkin from private svn
1 /*
2 +----------------------------------------------------------------------+
3 | PHP Version 4 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2006 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 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_01.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: Christian Muehlhaeuser <chris@last.fm> |
16 +----------------------------------------------------------------------+
17 */
18
19 /* $Id: header,v 1.10.8.1.4.1 2006/01/01 13:46:48 sniper Exp $ */
20
21 #ifndef PHP_KETAMA_H
22 #define PHP_KETAMA_H
23
24 extern zend_module_entry ketama_module_entry;
25 #define phpext_ketama_ptr &ketama_module_entry
26
27 #ifdef PHP_WIN32
28 #define PHP_KETAMA_API __declspec(dllexport)
29 #else
30 #define PHP_KETAMA_API
31 #endif
32
33 #ifdef ZTS
34 #include "TSRM.h"
35 #endif
36
37 PHP_MINIT_FUNCTION(ketama);
38 PHP_MSHUTDOWN_FUNCTION(ketama);
39 PHP_RINIT_FUNCTION(ketama);
40 PHP_RSHUTDOWN_FUNCTION(ketama);
41 PHP_MINFO_FUNCTION(ketama);
42
43 PHP_FUNCTION(ketama_roll);
44 PHP_FUNCTION(ketama_destroy);
45 PHP_FUNCTION(ketama_get_server);
46 PHP_FUNCTION(ketama_print_continuum);
47 PHP_FUNCTION(ketama_error);
48
49 /*
50 Declare any global variables you may need between the BEGIN
51 and END macros here:
52
53 ZEND_BEGIN_MODULE_GLOBALS(ketama)
54 long global_value;
55 char *global_string;
56 ZEND_END_MODULE_GLOBALS(ketama)
57 */
58
59 /* In every utility function you add that needs to use variables
60 in php_ketama_globals, call TSRMLS_FETCH(); after declaring other
61 variables used by that function, or better yet, pass in TSRMLS_CC
62 after the last function argument and declare your utility function
63 with TSRMLS_DC after the last declared argument. Always refer to
64 the globals in your function as KETAMA_G(variable). You are
65 encouraged to rename these macros something shorter, see
66 examples in any other php module directory.
67 */
68
69 #ifdef ZTS
70 #define KETAMA_G(v) TSRMG(ketama_globals_id, zend_ketama_globals *, v)
71 #else
72 #define KETAMA_G(v) (ketama_globals.v)
73 #endif
74
75 #endif /* PHP_KETAMA_H */
76
77
78 /*
79 * Local variables:
80 * tab-width: 4
81 * c-basic-offset: 4
82 * indent-tabs-mode: t
83 * End:
84 */
Something went wrong with that request. Please try again.