php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
intl_common.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | This source file is subject to version 3.01 of the PHP license, |
4 | that is bundled with this package in the file LICENSE, and is |
5 | available through the world-wide-web at the following url: |
6 | https://www.php.net/license/3_01.txt |
7 | If you did not receive a copy of the PHP license and are unable to |
8 | obtain it through the world-wide-web, please send a note to |
9 | license@php.net so we can mail you a copy immediately. |
10 +----------------------------------------------------------------------+
11 | Authors: Vadim Savchuk <vsavchuk@productengine.com> |
12 | Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
13 | Stanislav Malyshev <stas@zend.com> |
14 +----------------------------------------------------------------------+
15 */
16
17#ifndef INTL_COMMON_H
18#define INTL_COMMON_H
19/* Auxiliary macros */
20
22#include <php.h>
24#include <unicode/utypes.h>
25
26#ifndef UBYTES
27# define UBYTES(len) ((len) * sizeof(UChar))
28#endif
29
30#ifndef eumalloc
31# define eumalloc(size) (UChar*)safe_emalloc(size, sizeof(UChar), 0)
32#endif
33
34#ifndef eurealloc
35# define eurealloc(ptr, size) (UChar*)erealloc((ptr), size * sizeof(UChar))
36#endif
37
38#define USIZE(data) sizeof((data))/sizeof(UChar)
39#define UCHARS(len) ((len) / sizeof(UChar))
40
41#define INTL_ZSTR_VAL(str) (UChar*) ZSTR_VAL(str)
42#define INTL_ZSTR_LEN(str) UCHARS(ZSTR_LEN(str))
43
47
48#endif /* INTL_COMMON_H */
zend_class_entry * IntlException_ce_ptr
Definition intl_error.c:30
#define END_EXTERN_C()
#define BEGIN_EXTERN_C()
struct _zend_class_entry zend_class_entry