X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_object.c;h=51e2ca21831261083f6bc6a1c30c8c609640a5ca;hp=108848be08df66a9278158d5dea7e0c46b41634a;hb=b562e34cf4f8c8fae7b8fe773e0eed71592b09c2;hpb=0d925a2820b9d75b8e32c451fd400863e51e22fe diff --git a/http_message_object.c b/http_message_object.c index 108848b..51e2ca2 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -123,7 +123,8 @@ zend_function_entry http_message_object_fe[] = { ZEND_MALIAS(HttpMessage, __toString, toString, HTTP_ARGS(HttpMessage, toString), ZEND_ACC_PUBLIC) HTTP_MESSAGE_ME(fromString, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - {NULL, NULL, NULL} + + EMPTY_FUNCTION_ENTRY }; static zend_object_handlers http_message_object_handlers; @@ -183,9 +184,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 +235,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 +326,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 +779,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);