php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
dateformat_data.c
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
#ifdef HAVE_CONFIG_H
15
#include <config.h>
16
#endif
17
18
#include "
dateformat_data.h
"
19
20
/* {{{ void dateformat_data_init( dateformat_data* datef_data )
21
* Initialize internals of dateformat_data.
22
*/
23
void
dateformat_data_init
(
dateformat_data
* datef_data )
24
{
25
if
( !datef_data )
26
return
;
27
28
datef_data->
udatf
=
NULL
;
29
intl_error_reset
( &datef_data->
error
);
30
}
31
/* }}} */
32
33
/* {{{ void dateformat_data_free( dateformat_data* datef_data )
34
* Clean up memory allocated for dateformat_data
35
*/
36
void
dateformat_data_free
(
dateformat_data
* datef_data )
37
{
38
if
( !datef_data )
39
return
;
40
41
if
( datef_data->
udatf
)
42
udat_close( datef_data->
udatf
);
43
44
datef_data->
udatf
=
NULL
;
45
intl_error_reset
( &datef_data->
error
);
46
}
47
/* }}} */
48
49
/* {{{ dateformat_data* dateformat_data_create()
50
* Allocate memory for dateformat_data and initialize it with default values.
51
*/
52
dateformat_data
*
dateformat_data_create
(
void
)
53
{
54
dateformat_data
* datef_data =
ecalloc
( 1,
sizeof
(
dateformat_data
) );
55
56
dateformat_data_init
( datef_data );
57
58
return
datef_data;
59
}
60
/* }}} */
dateformat_data_create
dateformat_data * dateformat_data_create(void)
Definition
dateformat_data.c:52
dateformat_data_init
void dateformat_data_init(dateformat_data *datef_data)
Definition
dateformat_data.c:23
dateformat_data_free
void dateformat_data_free(dateformat_data *datef_data)
Definition
dateformat_data.c:36
dateformat_data.h
NULL
#define NULL
Definition
gdcache.h:45
intl_error_reset
void intl_error_reset(intl_error *err)
Definition
intl_error.c:78
dateformat_data
Definition
dateformat_data.h:23
dateformat_data::udatf
UDateFormat * udatf
Definition
dateformat_data.h:28
dateformat_data::error
intl_error error
Definition
dateformat_data.h:25
ecalloc
#define ecalloc(nmemb, size)
Definition
zend_alloc.h:158
ext
intl
dateformat
dateformat_data.c
Generated on Sat Aug 23 2025 01:46:08 for php-internal-docs by
1.13.2