1 /*
2    +----------------------------------------------------------------------+
3    | Zend OPcache                                                         |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 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    | Authors: Andi Gutmans <andi@php.net>                                 |
16    |          Zeev Suraski <zeev@php.net>                                 |
17    |          Stanislav Malyshev <stas@zend.com>                          |
18    |          Dmitry Stogov <dmitry@php.net>                              |
19    +----------------------------------------------------------------------+
20 */
21 
22 #ifndef ZEND_ACCELERATOR_UTIL_FUNCS_H
23 #define ZEND_ACCELERATOR_UTIL_FUNCS_H
24 
25 #include "zend.h"
26 #include "ZendAccelerator.h"
27 
28 zend_persistent_script* create_persistent_script(void);
29 void free_persistent_script(zend_persistent_script *persistent_script, int destroy_elements);
30 
31 void zend_accel_move_user_functions(HashTable *str, uint32_t count, zend_script *script);
32 void zend_accel_move_user_classes(HashTable *str, uint32_t count, zend_script *script);
33 
34 zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, int from_shared_memory);
35 
36 #define ADLER32_INIT 1     /* initial Adler-32 value */
37 
38 unsigned int zend_adler32(unsigned int checksum, unsigned char *buf, uint32_t len);
39 
40 unsigned int zend_accel_script_checksum(zend_persistent_script *persistent_script);
41 
42 #endif /* ZEND_ACCELERATOR_UTIL_FUNCS_H */
43