PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/intl/formatter - formatter_data.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 10 16 62.5 %
Date: 2014-08-23 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 5                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | This source file is subject to version 3.01 of the PHP license,      |
       6             :    | that is bundled with this package in the file LICENSE, and is        |
       7             :    | available through the world-wide-web at the following url:           |
       8             :    | http://www.php.net/license/3_01.txt                                  |
       9             :    | If you did not receive a copy of the PHP license and are unable to   |
      10             :    | obtain it through the world-wide-web, please send a note to          |
      11             :    | license@php.net so we can mail you a copy immediately.               |
      12             :    +----------------------------------------------------------------------+
      13             :    | Authors: Stanislav Malyshev <stas@zend.com>                          |
      14             :    +----------------------------------------------------------------------+
      15             :  */
      16             : 
      17             : #ifdef HAVE_CONFIG_H
      18             : #include "config.h"
      19             : #endif
      20             : 
      21             : #include "formatter_data.h"
      22             : 
      23             : /* {{{ void formatter_data_init( formatter_data* nf_data )
      24             :  * Initialize internals of formatter_data.
      25             :  */
      26         233 : void formatter_data_init( formatter_data* nf_data TSRMLS_DC )
      27             : {
      28         233 :         if( !nf_data )
      29           0 :                 return;
      30             : 
      31         233 :         nf_data->unum                = NULL;
      32         233 :         intl_error_reset( &nf_data->error TSRMLS_CC );
      33             : }
      34             : /* }}} */
      35             : 
      36             : /* {{{ void formatter_data_free( formatter_data* nf_data )
      37             :  * Clean up mem allocted by internals of formatter_data
      38             :  */
      39         233 : void formatter_data_free( formatter_data* nf_data TSRMLS_DC )
      40             : {
      41         233 :         if( !nf_data )
      42           0 :                 return;
      43             : 
      44         233 :         if( nf_data->unum )
      45         189 :                 unum_close( nf_data->unum );
      46             : 
      47         233 :         nf_data->unum = NULL;
      48         233 :         intl_error_reset( &nf_data->error TSRMLS_CC );
      49             : }
      50             : /* }}} */
      51             : 
      52             : /* {{{ formatter_data* formatter_data_create()
      53             :  * Alloc mem for formatter_data and initialize it with default values.
      54             :  */
      55           0 : formatter_data* formatter_data_create( TSRMLS_D )
      56             : {
      57           0 :         formatter_data* nf_data = ecalloc( 1, sizeof(formatter_data) );
      58             : 
      59           0 :         formatter_data_init( nf_data TSRMLS_CC );
      60             : 
      61           0 :         return nf_data;
      62             : }
      63             : /* }}} */
      64             : 
      65             : /*
      66             :  * Local variables:
      67             :  * tab-width: 4
      68             :  * c-basic-offset: 4
      69             :  * End:
      70             :  * vim600: noet sw=4 ts=4 fdm=marker
      71             :  * vim<600: noet sw=4 ts=4
      72             :  */

Generated by: LCOV version 1.10

Generated at Sat, 23 Aug 2014 22:39:33 +0000 (6 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.