php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
dateformat_class.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: Kirti Velankar <kirtig@yahoo-inc.com> |
12 +----------------------------------------------------------------------+
13*/
14#ifndef DATE_FORMAT_CLASS_H
15#define DATE_FORMAT_CLASS_H
16
17#include <php.h>
18
19#include "intl_common.h"
20#include "intl_error.h"
21#include "intl_data.h"
22#include "dateformat_data.h"
23
32
33static inline IntlDateFormatter_object *php_intl_dateformatter_fetch_object(zend_object *obj) {
34 return (IntlDateFormatter_object *)((char*)(obj) - XtOffsetOf(IntlDateFormatter_object, zo));
35}
36#define Z_INTL_DATEFORMATTER_P(zv) php_intl_dateformatter_fetch_object(Z_OBJ_P(zv))
37
40
41/* Auxiliary macros */
42
43#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlDateFormatter, dfo)
44#define DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(INTL_DATEFORMATTER, dfo)
45#define DATE_FORMAT_METHOD_FETCH_OBJECT \
46 DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
47 if (dfo->datef_data.udatf == NULL) \
48 { \
49 zend_throw_error(NULL, "Found unconstructed IntlDateFormatter"); \
50 RETURN_THROWS(); \
51 }
52
53#define DATE_FORMAT_OBJECT(dfo) (dfo)->datef_data.udatf
54
55#endif // #ifndef DATE_FORMAT_CLASS_H
zend_class_entry * IntlDateFormatter_ce_ptr
void dateformat_register_IntlDateFormatter_class(void)
#define XtOffsetOf(s_type, field)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object