header cleanups and fix some warnings
[m6w6/ext-http] / php_http_property_proxy.c
index 44ccd2cdf1665c0d0405a0a0c79ae9e6dd61cd77..ff768ba2afc3a340a9923237d3ac71d3de8ebf3b 100644 (file)
@@ -1,6 +1,16 @@
-
-#include "php_http.h"
-
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
+*/
+
+#include "php_http_api.h"
 
 php_http_property_proxy_t *php_http_property_proxy_init(php_http_property_proxy_t *proxy, zval *object, zval *member TSRMLS_DC)
 {
@@ -127,7 +137,7 @@ static zval *php_http_property_proxy_object_read_dimension(zval *object, zval *o
                        }
                } else {
                        offset = php_http_ztyp(IS_STRING, offset);
-                       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(property), Z_STRVAL_P(offset), Z_STRLEN_P(offset), (void *) &data)) {
+                       if (SUCCESS == zend_symtable_find(Z_ARRVAL_P(property), Z_STRVAL_P(offset), Z_STRLEN_P(offset), (void *) &data)) {
                                retval = *data;
                        }
                        zval_ptr_dtor(&offset);
@@ -149,6 +159,7 @@ static void php_http_property_proxy_object_write_dimension(zval *object, zval *o
        switch (Z_TYPE_P(property)) {
                case IS_NULL:
                        array_init(property);
+                       /* fallthrough */
                case IS_ARRAY:
                        Z_ADDREF_P(value);
                        if (!offset) {
@@ -187,3 +198,13 @@ PHP_MINIT_FUNCTION(http_property_proxy)
        return SUCCESS;
 }
 
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+