-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Expand file tree
/
Copy pathrangeformatter_class.h
More file actions
53 lines (40 loc) · 1.82 KB
/
Copy pathrangeformatter_class.h
File metadata and controls
53 lines (40 loc) · 1.82 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
+----------------------------------------------------------------------+
| Copyright © The PHP Group and Contributors. |
+----------------------------------------------------------------------+
| This source file is subject to the Modified BSD License that is |
| bundled with this package in the file LICENSE, and is available |
| through the World Wide Web at <https://www.php.net/license/>. |
| |
| SPDX-License-Identifier: BSD-3-Clause |
+----------------------------------------------------------------------+
| Authors: Bogdan Ungureanu <bogdanungureanu21@gmail.com> |
+----------------------------------------------------------------------+
*/
#ifndef RANGEFORMATTER_CLASS_H
#define RANGEFORMATTER_CLASS_H
#include <unicode/numberrangeformatter.h>
#ifdef __cplusplus
using icu::number::LocalizedNumberRangeFormatter;
#else
typedef void LocalizedNumberRangeFormatter;
#endif
typedef struct {
// error handling
intl_error error;
// formatter handling
LocalizedNumberRangeFormatter* unumrf;
} rangeformatter_data;
typedef struct {
rangeformatter_data nrf_data;
zend_object zo;
} IntlNumberRangeFormatter_object;
static inline IntlNumberRangeFormatter_object *php_intl_numberrangeformatter_fetch_object(zend_object *obj) {
return ZEND_CONTAINER_OF(obj, IntlNumberRangeFormatter_object, zo);
}
#define Z_INTL_RANGEFORMATTER_P(zv) php_intl_numberrangeformatter_fetch_object(Z_OBJ_P(zv))
#define RANGEFORMATTER_ERROR(nfo) (nfo)->nrf_data.error
#define RANGEFORMATTER_ERROR_P(nfo) &(RANGEFORMATTER_ERROR(nfo))
#define RANGEFORMATTER_OBJECT(nfo) (nfo)->nrf_data.unumrf
void rangeformatter_register_class(void);
#endif