/* }}} */
/* {{{ date_interval_format - */
-static char *date_interval_format(char *format, int format_len, timelib_rel_time *t)
+static zend_string *date_interval_format(char *format, int format_len, timelib_rel_time *t)
{
smart_str string = {0};
int i, length, have_format_spec = 0;
char buffer[33];
if (!format_len) {
- return estrdup("");
+ return STR_EMPTY_ALLOC();
}
for (i = 0; i < format_len; i++) {
diobj = (php_interval_obj *) Z_OBJ_P(object);
DATE_CHECK_INITIALIZED(diobj->initialized, DateInterval);
-//??? RETURN_STRING(date_interval_format(format, format_len, diobj->diff), 0);
- RETURN_STRING(date_interval_format(format, format_len, diobj->diff));
+ RETURN_STR(date_interval_format(format, format_len, diobj->diff));
}
/* }}} */
if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
- return;
+ return NULL;
}
if (iterator->object->heap->count == 0 || ZVAL_IS_UNDEF(element)) {
if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
- return;
+ return NULL;
}
if (iterator->object->heap->count == 0 || ZVAL_IS_UNDEF(element)) {
if (ops->function_name) {
if (ops->scope) {
phpdbg_notice(
- "Literal Constants in %s::%s() (%d)", ops->scope->name, ops->function_name, count);
+ "Literal Constants in %s::%s() (%d)", ops->scope->name, ops->function_name->val, count);
} else {
phpdbg_notice(
- "Literal Constants in %s() (%d)", ops->function_name, count);
+ "Literal Constants in %s() (%d)", ops->function_name->val, count);
}
} else {
if (ops->filename) {
phpdbg_notice(
- "Literal Constants in %s (%d)", ops->filename, count);
+ "Literal Constants in %s (%d)", ops->filename->val, count);
} else {
phpdbg_notice(
"Literal Constants @ %p (%d)", ops, count);
const zend_op_array *ops;
if (fbc->type != ZEND_USER_FUNCTION) {
- phpdbg_error("The function requested (%s) is not user defined", fbc->common.function_name);
+ phpdbg_error("The function requested (%s) is not user defined", fbc->common.function_name->val);
return;
}
(ce->ce_flags & ZEND_ACC_ABSTRACT) ?
"Abstract Class" :
"Class",
- *ce->name->val);
+ ce->name->val);
phpdbg_writeln("Methods (%d):", zend_hash_num_elements(&ce->function_table));
if (zend_hash_num_elements(&ce->function_table)) {
if ((fbc = zend_hash_str_find_ptr(&ce->function_table, lcname, strlen(lcname))) != NULL) {
phpdbg_notice("%s Method %s",
(fbc->type == ZEND_USER_FUNCTION) ? "User" : "Internal",
- fbc->common.function_name);
+ fbc->common.function_name->val);
phpdbg_print_function_helper(fbc TSRMLS_CC);
} else {