AC_DEFINE("HAVE_CURL_MULTI_STRERROR", 1, "");
AC_DEFINE("HAVE_CURL_EASY_STRERROR", 1, "");
AC_DEFINE("HAVE_CURL_EASY_RESET", 1, "");
+ AC_DEFINE("CURL_STATICLIB", 1, "");
} else {
WARNING("curl convenience functions not enabled; libraries and headers not found");
}
getObjectEx(http_message_object, obj, object);
http_message *msg = obj->message;
zval *return_value;
+#ifdef WONKY
+ zend_hash_value h = zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member)+1);
+#else
zend_property_info *pinfo = zend_get_property_info(obj->zo.ce, member, 1 TSRMLS_CC);
if (!pinfo || ACC_PROP_PUBLIC(pinfo->flags)) {
return zend_get_std_object_handlers()->read_property(object, member, type TSRMLS_CC);
}
+#endif
return_value = &EG(uninitialized_zval);
return_value->refcount = 0;
return_value->is_ref = 0;
-#if 0
- fprintf(stderr, "Read HttpMessage::$%s\n", Z_STRVAL_P(member));
-#endif
-
+#ifdef WONKY
+ switch (h)
+#else
switch (pinfo->h)
+#endif
{
case HTTP_MSG_PROPHASH_TYPE:
RETVAL_LONG(msg->type);
break;
default:
+#ifdef WONKY
+ return zend_get_std_object_handlers()->read_property(object, member, type TSRMLS_CC);
+#else
RETVAL_NULL();
+#endif
break;
}
{
getObjectEx(http_message_object, obj, object);
http_message *msg = obj->message;
+#ifdef WONKY
+ zend_hash_value h = zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member) + 1);
+#else
zend_property_info *pinfo = zend_get_property_info(obj->zo.ce, member, 1 TSRMLS_CC);
if (!pinfo || ACC_PROP_PUBLIC(pinfo->flags)) {
zend_get_std_object_handlers()->write_property(object, member, value TSRMLS_CC);
return;
}
-
-#if 0
- fprintf(stderr, "Write HttpMessage::$%s\n", Z_STRVAL_P(member));
#endif
+#ifdef WONKY
+ switch (h)
+#else
switch (pinfo->h)
+#endif
{
case HTTP_MSG_PROPHASH_TYPE:
convert_to_long_ex(&value);
convert_to_string_ex(&value);
STR_SET(msg->http.info.response.status, estrndup(Z_STRVAL_P(value), Z_STRLEN_P(value)));
}
-
+ break;
+
+ default:
+#ifdef WONKY
+ zend_get_std_object_handlers()->write_property(object, member, value TSRMLS_CC);
+#endif
+ break;
}
}
zend_register_long_constant(http_method, method_len + 1, meth_num, CONST_CS, http_module_number TSRMLS_CC);
efree(http_method);
-#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
+#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) && !defined(WONKY)
method_len = spprintf(&http_method, 0, "METH_%s", method);
zend_declare_class_constant_long(http_request_object_ce, http_method, method_len, meth_num TSRMLS_CC);
efree(http_method);
return FAILURE;
}
-#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
+#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) && !defined(WONKY)
method_len = spprintf(&http_method, 0, "METH_%s", Z_STRVAL_PP(zmethod));
if ((SUCCESS != zend_hash_del(&http_request_object_ce->constants_table, http_method, method_len + 1))) {
http_error_ex(HE_NOTICE, HTTP_E_REQUEST_METHOD, "Could not unregister request method: HttpRequest::%s", http_method);