pajoye          Tue Nov 28 01:31:53 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/zip    php_zip.c 
  Log:
  - fix warning
  - addEmptyDir returns true on success
  - remove useless semi column
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.19&r2=1.1.2.20&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.19 php-src/ext/zip/php_zip.c:1.1.2.20
--- php-src/ext/zip/php_zip.c:1.1.2.19  Sun Nov 12 00:31:03 2006
+++ php-src/ext/zip/php_zip.c   Tue Nov 28 01:31:53 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_zip.c,v 1.1.2.19 2006/11/12 00:31:03 nlopess Exp $ */
+/* $Id: php_zip.c,v 1.1.2.20 2006/11/28 01:31:53 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -122,7 +122,7 @@
                len = spprintf(&file_dirname_fullpath, 0, "%s", dest);
        }
 
-       php_basename(file, file_len, NULL, 0, &file_basename, 
&file_basename_len TSRMLS_CC);
+       php_basename(file, file_len, NULL, 0, &file_basename, (int 
*)&file_basename_len TSRMLS_CC);
 
        if (SAFEMODE_CHECKFILE(file_dirname_fullpath)) {
                efree(file_dirname_fullpath);
@@ -954,7 +954,7 @@
 
 /* {{{ proto bool createEmptyDir(string dirname) U
 Returns the index of the entry named filename in the archive */
-ZIPARCHIVE_METHOD(addEmptyDir)
+static ZIPARCHIVE_METHOD(addEmptyDir)
 {
        struct zip *intern;
        zval *this = getThis();
@@ -978,6 +978,7 @@
        if (zip_add_dir(intern, (const char *)dirname) < 0) {
                RETURN_FALSE;
        }
+       RETURN_TRUE;
 }
 /* }}} */
 
@@ -1004,7 +1005,6 @@
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sll",
                        &filename, &filename_len, &entry_name, &entry_name_len, 
&offset_start, &offset_len) == FAILURE) {
-               WRONG_PARAM_COUNT;
                return;
        }
 
@@ -1375,7 +1375,7 @@
        ZIP_FROM_OBJECT(intern, this);
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
-                       &name, &name_len, &flags) == FAILURE) {;
+                       &name, &name_len, &flags) == FAILURE) {
                return;
        }
        if (name_len < 1) {
@@ -2001,7 +2001,7 @@
        php_info_print_table_start();
 
        php_info_print_table_row(2, "Zip", "enabled");
-       php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.19 2006/11/12 00:31:03 nlopess Exp $");
+       php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.20 2006/11/28 01:31:53 pajoye Exp $");
        php_info_print_table_row(2, "Zip version", "2.0.0");
        php_info_print_table_row(2, "Libzip version", "0.7.1");
 

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

Reply via email to