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

LTP GCOV extension - code coverage report
Current view: directory - intl/dateformat - dateformat_data.c
Test: PHP Code Coverage
Date: 2009-11-21 Instrumented lines: 16
Code covered: 62.5 % Executed lines: 10
Legend: not executed executed

       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                 : void dateformat_data_init( dateformat_data* datef_data TSRMLS_DC )
      26             272 : {
      27             272 :         if( !datef_data )
      28               0 :                 return;
      29                 : 
      30             272 :         datef_data->udatf = NULL;
      31             272 :         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                 : void dateformat_data_free( dateformat_data* datef_data TSRMLS_DC )
      39             272 : {
      40             272 :         if( !datef_data )
      41               0 :                 return;
      42                 : 
      43             272 :         if( datef_data->udatf )
      44             272 :                 udat_close( datef_data->udatf );
      45                 : 
      46             272 :         datef_data->udatf = NULL;
      47             272 :         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                 : dateformat_data* dateformat_data_create( TSRMLS_D )
      55               0 : {
      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: LTP GCOV extension version 1.5

Generated at Sat, 21 Nov 2009 12:27:01 +0000 (3 days ago)

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