summaryrefslogtreecommitdiff
path: root/ext/tidy
diff options
context:
space:
mode:
authorJohn Coggeshall <john@php.net>2004-04-20 18:28:09 +0000
committerJohn Coggeshall <john@php.net>2004-04-20 18:28:09 +0000
commit8e1391ce4905b3d9745dafbb20eb269b80e4ae5f (patch)
tree862d94c1807c7e92a14e800e7f24f3dae83cecc6 /ext/tidy
parent844b4738fd65bf84e59b0f608cbde9fd7677946b (diff)
downloadphp-git-8e1391ce4905b3d9745dafbb20eb269b80e4ae5f.tar.gz
No need for exception function, and renamed the 'error_buf' prop to
errorBuffer to conform with the rest of the ext.
Diffstat (limited to 'ext/tidy')
-rw-r--r--ext/tidy/tidy.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 7dfa6fc1c0..b58c2c3e7d 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -93,8 +93,6 @@
} \
}
-#define TIDY_THROW _php_tidy_throw_exception
-
#define REGISTER_TIDY_CLASS(classname, name, parent) \
{ \
zend_class_entry ce; \
@@ -330,27 +328,6 @@ void php_tidy_panic(ctmbstr msg)
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not allocate memory for tidy! (Reason: %s)", (char *)msg);
}
-static void _php_tidy_throw_exception(char *message, ...)
-{
- char *msg;
- va_list ap;
-
- TSRMLS_FETCH();
-
- va_start(ap, message);
- vspprintf(&msg, 0, message, ap);
-
- if(TG(inst)) {
- zend_throw_exception(tidy_ce_exception, msg, 0 TSRMLS_CC);
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", msg);
- }
-
- va_end(ap);
- efree(msg);
-
-}
-
static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value TSRMLS_DC)
{
TidyOption opt;
@@ -486,7 +463,7 @@ static char *php_tidy_file_to_mem(char *filename, zend_bool use_include_path TSR
int len;
char *data = NULL;
- if (!(stream = php_stream_open_wrapper(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL))) {
+ if (!(stream = php_stream_open_wrapper(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE, NULL))) {
return NULL;
}
if ((len = php_stream_copy_to_mem(stream, &data, PHP_STREAM_COPY_ALL, 0)) == 0) {
@@ -693,7 +670,7 @@ static void tidy_doc_update_properties(PHPTidyObj *obj TSRMLS_DC)
if (obj->ptdoc->errbuf->size) {
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, obj->ptdoc->errbuf->bp, obj->ptdoc->errbuf->size, TRUE);
- zend_hash_update(obj->std.properties, "error_buf", sizeof("error_buf"), (void *)&temp, sizeof(zval *), NULL);
+ zend_hash_update(obj->std.properties, "errorBuffer", sizeof("errorBuffer"), (void *)&temp, sizeof(zval *), NULL);
}
}
@@ -777,7 +754,7 @@ static void tidy_add_default_properties(PHPTidyObj *obj, tidy_obj_type type TSRM
break;
case is_doc:
- ADD_PROPERTY_NULL(obj->std.properties, error_buf);
+ ADD_PROPERTY_NULL(obj->std.properties, errorBuffer);
ADD_PROPERTY_NULL(obj->std.properties, value);
break;