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/dateformat - dateformat_data.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 10 16 62.5 %
Date: 2014-07-27 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: Kirti Velankar <kirtig@yahoo-inc.com>                       |
      14             :    +----------------------------------------------------------------------+
      15             : */
      16             : #ifdef HAVE_CONFIG_H
      17             : #include "config.h"
      18             : #endif
      19             : 
      20             : #include "dateformat_data.h"
      21             : 
      22             : /* {{{ void dateformat_data_init( dateformat_data* datef_data )
      23             :  * Initialize internals of dateformat_data.
      24             :  */
      25         349 : void dateformat_data_init( dateformat_data* datef_data TSRMLS_DC )
      26             : {
      27         349 :         if( !datef_data )
      28           0 :                 return;
      29             : 
      30         349 :         datef_data->udatf = NULL;
      31         349 :         intl_error_reset( &datef_data->error TSRMLS_CC );
      32             : }
      33             : /* }}} */
      34             : 
      35             : /* {{{ void dateformat_data_free( dateformat_data* datef_data )
      36             :  * Clean up memory allocated for dateformat_data
      37             :  */
      38         349 : void dateformat_data_free( dateformat_data* datef_data TSRMLS_DC )
      39             : {
      40         349 :         if( !datef_data )
      41           0 :                 return;
      42             : 
      43         349 :         if( datef_data->udatf )
      44         343 :                 udat_close( datef_data->udatf );
      45             : 
      46         349 :         datef_data->udatf = NULL;
      47         349 :         intl_error_reset( &datef_data->error TSRMLS_CC );
      48             : }
      49             : /* }}} */
      50             : 
      51             : /* {{{ dateformat_data* dateformat_data_create()
      52             :  * Allocate memory for dateformat_data and initialize it with default values.
      53             :  */
      54           0 : dateformat_data* dateformat_data_create( TSRMLS_D )
      55             : {
      56           0 :         dateformat_data* datef_data = ecalloc( 1, sizeof(dateformat_data) );
      57             : 
      58           0 :         dateformat_data_init( datef_data TSRMLS_CC );
      59             : 
      60           0 :         return datef_data;
      61             : }
      62             : /* }}} */

Generated by: LCOV version 1.10

Generated at Sun, 27 Jul 2014 12:58:29 +0000 (2 days ago)

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