Patch from Daniel Beckham, fetch the entry resource id, not the directory

resource id and fix prototype.
This commit is contained in:
Sterling Hughes 2001-06-02 05:12:44 +00:00
parent ea90497f67
commit aa281a0771

View file

@ -226,7 +226,7 @@ PHP_FUNCTION(zip_entry_compressionmethod)
} }
/* }}} */ /* }}} */
/* {{{ proto bool zip_open(resource zip_dp, resource zip_entry, string mode) /* {{{ proto bool zip_entry_open(resource zip_dp, resource zip_entry, string mode)
Open a Zip File, pointed by the resource entry */ Open a Zip File, pointed by the resource entry */
PHP_FUNCTION(zip_entry_open) PHP_FUNCTION(zip_entry_open)
{ {
@ -240,7 +240,7 @@ PHP_FUNCTION(zip_entry_open)
} }
ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, le_zip_dir_name, le_zip_dir); ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, le_zip_dir_name, le_zip_dir);
ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_dp, -1, le_zip_entry_name, le_zip_entry); ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, le_zip_entry);
entry->fp = zzip_file_open(archive_p, entry->dirent.d_name, O_RDONLY | O_BINARY); entry->fp = zzip_file_open(archive_p, entry->dirent.d_name, O_RDONLY | O_BINARY);