Back to index

php5  5.3.10
Functions
spl_engine.h File Reference
#include "php.h"
#include "php_spl.h"
#include "zend_interfaces.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PHPAPI void spl_instantiate (zend_class_entry *pce, zval **object, int alloc TSRMLS_DC)
PHPAPI long spl_offset_convert_to_long (zval *offset TSRMLS_DC)
static int spl_instantiate_arg_ex1 (zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC)
static int spl_instantiate_arg_ex2 (zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC)

Function Documentation

PHPAPI void spl_instantiate ( zend_class_entry *  pce,
zval **  object,
int alloc  TSRMLS_DC 
)

Definition at line 35 of file spl_engine.c.

{
       if (alloc) {
              ALLOC_ZVAL(*object);
       }
       object_init_ex(*object, pce);
       Z_SET_REFCOUNT_PP(object, 1);
       Z_SET_ISREF_PP(object); /* check if this can be hold always */
}

Here is the caller graph for this function:

static int spl_instantiate_arg_ex1 ( zend_class_entry *  pce,
zval **  retval,
int  alloc,
zval *arg1  TSRMLS_DC 
) [inline, static]

Definition at line 33 of file spl_engine.h.

{
       spl_instantiate(pce, retval, alloc TSRMLS_CC);
       
       zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 1, arg1, NULL TSRMLS_CC);
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int spl_instantiate_arg_ex2 ( zend_class_entry *  pce,
zval **  retval,
int  alloc,
zval *  arg1,
zval *arg2  TSRMLS_DC 
) [inline, static]

Definition at line 43 of file spl_engine.h.

{
       spl_instantiate(pce, retval, alloc TSRMLS_CC);
       
       zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC);
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI long spl_offset_convert_to_long ( zval *offset  TSRMLS_DC)

Definition at line 46 of file spl_engine.c.

{
       switch(Z_TYPE_P(offset)) {
       case IS_STRING:
              ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx);
              break;
       case IS_DOUBLE:
       case IS_RESOURCE:
       case IS_BOOL:
       case IS_LONG:
              if (Z_TYPE_P(offset) == IS_DOUBLE) {
                     return (long)Z_DVAL_P(offset);
              } else {
                     return Z_LVAL_P(offset);
              }
       }
       return -1;
} 

Here is the caller graph for this function: