--- embedaddon/php/ext/spl/spl_functions.c 2012/02/21 23:48:01 1.1.1.1 +++ embedaddon/php/ext/spl/spl_functions.c 2012/05/29 12:34:42 1.1.1.2 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_functions.c,v 1.1.1.1 2012/02/21 23:48:01 misho Exp $ */ +/* $Id: spl_functions.c,v 1.1.1.2 2012/05/29 12:34:42 misho Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -102,6 +102,18 @@ void spl_add_interfaces(zval *list, zend_class_entry * } } /* }}} */ + +/* {{{ spl_add_traits */ +void spl_add_traits(zval *list, zend_class_entry * pce, int allow, int ce_flags TSRMLS_DC) +{ + zend_uint num_traits; + + for (num_traits = 0; num_traits < pce->num_traits; num_traits++) { + spl_add_class_name(list, pce->traits[num_traits], allow, ce_flags TSRMLS_CC); + } +} +/* }}} */ + /* {{{ spl_add_classes */ int spl_add_classes(zend_class_entry *pce, zval *list, int sub, int allow, int ce_flags TSRMLS_DC)