- ditch TSRMLS_FETCH() occurences
[m6w6/ext-http] / http_message_object.c
index 108848be08df66a9278158d5dea7e0c46b41634a..7e04bf0537994cd7d3125c8d07e9d00a62b225ba 100644 (file)
@@ -183,9 +183,11 @@ static inline void _http_message_object_declare_default_properties(TSRMLS_D)
 {
        zend_class_entry *ce = http_message_object_ce;
 
+#ifndef WONKY
        DCL_CONST(long, "NONE", HTTP_MSG_NONE);
        DCL_CONST(long, "REQUEST", HTTP_MSG_REQUEST);
        DCL_CONST(long, "RESPONSE", HTTP_MSG_RESPONSE);
+#endif
 
        DCL_PROP(PROTECTED, long, type, HTTP_MSG_NONE);
        DCL_PROP(PROTECTED, string, body, "");
@@ -232,7 +234,7 @@ static zval *_http_message_object_read_prop(zval *object, zval *member, int type
        fprintf(stderr, "Read HttpMessage::$%s\n", Z_STRVAL_P(member));
 #endif
        if (!EG(scope) || !instanceof_function(EG(scope), obj->zo.ce TSRMLS_CC)) {
-               zend_error(HE_WARNING, "Cannot access protected property %s::$%s", obj->zo.ce->name, Z_STRVAL_P(member));
+               zend_error(E_WARNING, "Cannot access protected property %s::$%s", obj->zo.ce->name, Z_STRVAL_P(member));
                return EG(uninitialized_zval_ptr);
        }
 
@@ -323,7 +325,7 @@ static void _http_message_object_write_prop(zval *object, zval *member, zval *va
        fprintf(stderr, "Write HttpMessage::$%s\n", Z_STRVAL_P(member));
 #endif
        if (!EG(scope) || !instanceof_function(EG(scope), obj->zo.ce TSRMLS_CC)) {
-               zend_error(HE_WARNING, "Cannot access protected property %s::$%s", obj->zo.ce->name, Z_STRVAL_P(member));
+               zend_error(E_WARNING, "Cannot access protected property %s::$%s", obj->zo.ce->name, Z_STRVAL_P(member));
        }
 
        switch (zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member) + 1))
@@ -776,7 +778,6 @@ PHP_METHOD(HttpMessage, getHttpVersion)
 
        IF_RETVAL_USED {
                char ver[4] = {0};
-               double version;
                getObject(http_message_object, obj);
 
                sprintf(ver, "%1.1lf", obj->message->http.version);