john            Tue Apr 20 14:28:09 2004 EDT

  Modified files:              
    /php-src/ext/tidy   tidy.c 
  Log:
  No need for exception function, and renamed the 'error_buf' prop to
  errorBuffer to conform with the rest of the ext.
  
  
http://cvs.php.net/diff.php/php-src/ext/tidy/tidy.c?r1=1.48&r2=1.49&ty=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.48 php-src/ext/tidy/tidy.c:1.49
--- php-src/ext/tidy/tidy.c:1.48        Mon Apr 19 20:26:48 2004
+++ php-src/ext/tidy/tidy.c     Tue Apr 20 14:28:09 2004
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: tidy.c,v 1.48 2004/04/20 00:26:48 iliaa Exp $ */
+/* $Id: tidy.c,v 1.49 2004/04/20 18:28:09 john Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -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 @@
        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 @@
        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 @@
        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 @@
                        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;
 
@@ -952,7 +929,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Tidy support", "enabled");
        php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
-       php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " 
($Id: tidy.c,v 1.48 2004/04/20 00:26:48 iliaa Exp $)");
+       php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " 
($Id: tidy.c,v 1.49 2004/04/20 18:28:09 john Exp $)");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to