PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.3.1
ShareThis Dashboard for Google Analytics v3.3.1
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / google / crc32 / ext / php_crc32c.h
googleanalytics / lib / analytics-admin / vendor / google / crc32 / ext Last commit date
tests 3 years ago config.m4 3 years ago hash_crc32c.c 3 years ago install_crc32c.sh 3 years ago php_crc32c.c 3 years ago php_crc32c.h 3 years ago
php_crc32c.h
54 lines
1 /**
2 * Copyright 2019 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * crc32c extension for PHP
19 */
20 #ifndef PHP_CRC32C_H
21 # define PHP_CRC32C_H
22
23 #ifdef HAVE_CONFIG_H
24 # include "config.h"
25 #endif
26
27 #include "php.h"
28
29 #include <stdint.h>
30 #include <stdbool.h>
31
32 #ifdef ZTS
33 # include "TSRM.h"
34 #endif
35
36 extern zend_module_entry crc32c_module_entry;
37
38 # define PHP_CRC32C_VERSION "1.0.0"
39
40 # if PHP_VERSION_ID >= 70000
41 # if defined(ZTS) && defined(COMPILE_DL_CRC32C)
42 ZEND_TSRMLS_CACHE_EXTERN()
43 # endif
44 # endif
45
46 static void int2byte(uint32_t i, uint8_t b[4]) {
47 b[0] = (uint8_t) ((i >> 24) & 0xff);
48 b[1] = (uint8_t) ((i >> 16) & 0xff);
49 b[2] = (uint8_t) ((i >> 8) & 0xff);
50 b[3] = (uint8_t) (i & 0xff);
51 }
52
53 #endif /* PHP_CRC32C_H */
54