cvs: pecl /http http.c

From: Date: Tue, 12 Apr 2005 11:29:35 +0000
Subject: cvs: pecl /http http.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2973@lists.php.net to get a copy of this message
mike Tue Apr 12 07:29:35 2005 EDT Modified files: /pecl/http http.c Log: - undef debug stmts - clean obj prop hash on beginning ... http://cvs.php.net/diff.php/pecl/http/http.c?r1=1.59&r2=1.60&ty=u Index: pecl/http/http.c diff -u pecl/http/http.c:1.59 pecl/http/http.c:1.60 --- pecl/http/http.c:1.59 Tue Apr 12 07:19:46 2005 +++ pecl/http/http.c Tue Apr 12 07:29:32 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c,v 1.59 2005/04/12 11:19:46 mike Exp $ */ +/* $Id: http.c,v 1.60 2005/04/12 11:29:32 mike Exp $ */ #ifdef HAVE_CONFIG_H @@ -188,7 +188,7 @@ ALLOC_ZVAL(return_value); return_value->refcount = 0; -#if 1 +#if 0 fprintf(stderr, "Reading property: %s(%d==%d) (%lu)\n", Z_STRVAL_P(member), Z_STRLEN_P(member), strlen(Z_STRVAL_P(member)), zend_get_hash_value(Z_STRVAL_P(member), strlen(Z_STRVAL_P(member)) + 1) ); @@ -285,7 +285,7 @@ zend_error(E_WARNING, "Cannot access protected property %s::$%s", obj->zo.ce->name, Z_STRVAL_P(member)); } -#if 1 +#if 0 fprintf(stderr, "Writing property: %s(%d==%d) (%lu)\n", Z_STRVAL_P(member), Z_STRLEN_P(member), strlen(Z_STRVAL_P(member)), zend_get_hash_value(Z_STRVAL_P(member), strlen(Z_STRVAL_P(member)) + 1) ); @@ -378,9 +378,11 @@ int m_prop_len; \ Z_ARRVAL(array) = OBJ_PROP(obj); \ zend_mangle_property_name(&m_prop_name, &m_prop_len, "*", 1, name, lenof(name), 1); \ - add_assoc_stringl_ex(&array, m_prop_name, m_prop_len, val, len, val != empty_string); \ + add_assoc_stringl_ex(&array, m_prop_name, sizeof(name)+4, val, len, val != empty_string); \ } + zend_hash_clean(OBJ_PROP(obj)); + ASSOC_PROP(obj, long, "type", msg->type); ASSOC_STRINGL(obj, "raw", msg->raw, msg->len) ASSOC_STRINGL(obj, "body", PHPSTR_VAL(msg), PHPSTR_LEN(msg)); @@ -420,7 +422,7 @@ } #define http_message_global_init() _http_message_global_init(TSRMLS_C) -static void _http_message_global_init(TSRMLS_D) +static inline void _http_message_global_init(TSRMLS_D) { http_message_object_handlers.read_property = http_message_object_read_prop; http_message_object_handlers.write_property = http_message_object_write_prop; @@ -471,7 +473,6 @@ ALLOC_HASHTABLE(OBJ_PROP(o)); zend_hash_init(OBJ_PROP(o), 0, NULL, ZVAL_PTR_DTOR, 0); - //zend_hash_copy(OBJ_PROP(o), &ce->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); ov.handle = zend_objects_store_put(o, (zend_objects_store_dtor_t) zend_objects_destroy_object, http_message_free_object, NULL TSRMLS_CC); ov.handlers = &http_message_object_handlers;

« previous php.pecl.cvs (#2973) next »