X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_object.c;h=7e04bf0537994cd7d3125c8d07e9d00a62b225ba;hp=71c06d5f108b0dd8fa133890c2402449053e25a0;hb=a7c9ca5fe4922c1064b3397b61eca6d83cea6cfa;hpb=a4b593d03ef14d9bc422cbe6ce471a7b5b8abe5d diff --git a/http_message_object.c b/http_message_object.c index 71c06d5..7e04bf0 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -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))