Back to index

php5  5.3.10
Classes | Defines | Typedefs
intl_data.h File Reference
#include <unicode/utypes.h>
#include "intl_error.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _intl_data

Defines

#define INTL_METHOD_INIT_VARS(oclass, obj)
#define INTL_DATA_ERROR(obj)   (((intl_object *)(obj))->error)
#define INTL_DATA_ERROR_P(obj)   (&(INTL_DATA_ERROR((obj))))
#define INTL_DATA_ERROR_CODE(obj)   INTL_ERROR_CODE(INTL_DATA_ERROR((obj)))
#define INTL_METHOD_FETCH_OBJECT(oclass, obj)
#define INTL_CHECK_STATUS(err, msg)
#define INTL_METHOD_CHECK_STATUS(obj, msg)
#define INTL_CTOR_CHECK_STATUS(obj, msg)
#define INTL_METHOD_RETVAL_UTF8(obj, ustring, ulen, free_it)
#define INTL_MAX_LOCALE_LEN   80
#define INTL_CHECK_LOCALE_LEN(locale_len)
#define INTL_CHECK_LOCALE_LEN_OBJ(locale_len, object)

Typedefs

typedef struct _intl_data intl_object

Class Documentation

struct _intl_data

Definition at line 30 of file intl_data.h.

Collaboration diagram for _intl_data:
Class Members
intl_error error
zend_object zo

Define Documentation

#define INTL_CHECK_LOCALE_LEN (   locale_len)
Value:
if((locale_len) > INTL_MAX_LOCALE_LEN) {                                                                        \
              intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,                                                          \
       "Locale string too long, should be no longer than 80 characters", 0 TSRMLS_CC );    \
              RETURN_NULL();                                                                                                                       \
       }

Definition at line 90 of file intl_data.h.

#define INTL_CHECK_LOCALE_LEN_OBJ (   locale_len,
  object 
)
Value:
if((locale_len) > INTL_MAX_LOCALE_LEN) {                                                                        \
              intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,                                                          \
       "Locale string too long, should be no longer than 80 characters", 0 TSRMLS_CC );    \
              zval_dtor(object);                                                                                                            \
              ZVAL_NULL(object);                                                                                                            \
              RETURN_NULL();                                                                                                                       \
       }

Definition at line 97 of file intl_data.h.

#define INTL_CHECK_STATUS (   err,
  msg 
)
Value:
intl_error_set_code( NULL, (err) TSRMLS_CC );                                              \
    if( U_FAILURE((err)) )                                                                                      \
    {                                                                                                                         \
        intl_error_set_custom_msg( NULL, msg, 0 TSRMLS_CC );                        \
        RETURN_FALSE;                                                                                                  \
    }

Definition at line 49 of file intl_data.h.

#define INTL_CTOR_CHECK_STATUS (   obj,
  msg 
)
Value:
intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((obj)) TSRMLS_CC );                        \
    if( U_FAILURE( INTL_DATA_ERROR_CODE((obj)) ) )                                                              \
    {                                                                                                                                       \
        intl_errors_set_custom_msg( INTL_DATA_ERROR_P((obj)), msg, 0 TSRMLS_CC );   \
              zval_dtor(return_value);                                                                                        \
        RETURN_NULL();                                                                                                               \
    }

Definition at line 67 of file intl_data.h.

#define INTL_DATA_ERROR (   obj)    (((intl_object *)(obj))->error)

Definition at line 40 of file intl_data.h.

#define INTL_DATA_ERROR_CODE (   obj)    INTL_ERROR_CODE(INTL_DATA_ERROR((obj)))

Definition at line 42 of file intl_data.h.

#define INTL_DATA_ERROR_P (   obj)    (&(INTL_DATA_ERROR((obj))))

Definition at line 41 of file intl_data.h.

#define INTL_MAX_LOCALE_LEN   80

Definition at line 88 of file intl_data.h.

#define INTL_METHOD_CHECK_STATUS (   obj,
  msg 
)
Value:
intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((obj)) TSRMLS_CC );                        \
    if( U_FAILURE( INTL_DATA_ERROR_CODE((obj)) ) )                                                              \
    {                                                                                                                                       \
        intl_errors_set_custom_msg( INTL_DATA_ERROR_P((obj)), msg, 0 TSRMLS_CC );   \
        RETURN_FALSE;                                                                      \
    }

Definition at line 58 of file intl_data.h.

#define INTL_METHOD_FETCH_OBJECT (   oclass,
  obj 
)
Value:
obj = (oclass##_object *) zend_object_store_get_object( object TSRMLS_CC );  \
    intl_error_reset( INTL_DATA_ERROR_P(obj) TSRMLS_CC );                                         \

Definition at line 44 of file intl_data.h.

#define INTL_METHOD_INIT_VARS (   oclass,
  obj 
)
Value:
zval*             object  = NULL;                \
       oclass##_object*  obj     = NULL;                \
       intl_error_reset( NULL TSRMLS_CC );

Definition at line 35 of file intl_data.h.

#define INTL_METHOD_RETVAL_UTF8 (   obj,
  ustring,
  ulen,
  free_it 
)
Value:
{                                                                                                                                                                       \
       char *u8value;                                                                                                                                            \
       int u8len;                                                                                                                                                \
       intl_convert_utf16_to_utf8(&u8value, &u8len, ustring, ulen, &INTL_DATA_ERROR_CODE((obj))); \
       if((free_it)) {                                                                                                                                           \
              efree(ustring);                                                                                                                                    \
       }                                                                                                                                                                \
       INTL_METHOD_CHECK_STATUS((obj), "Error converting value to UTF-8");                                             \
       RETVAL_STRINGL(u8value, u8len, 0);                                                                                                   \
}

Definition at line 76 of file intl_data.h.


Typedef Documentation

typedef struct _intl_data intl_object