Browse Source

All tests pass here now. Thanks Philip for reporting compiler errors that don't show on my setup.

experimental/first_unicode_implementation
Steph Fox 19 years ago
parent
commit
15fefd3692
  1. 7
      ext/phar/phar_object.c
  2. 5
      ext/phar/util.c

7
ext/phar/phar_object.c

@ -1601,7 +1601,6 @@ static void phar_convert_to_other(phar_archive_data *source, int convert, char *
{
phar_archive_data phar = {0};
char *error;
int is_data;
phar_entry_info *entry, newentry;
/* set whole-archive compression and type from parameter */
@ -1749,7 +1748,7 @@ static void phar_convert_to_other(phar_archive_data *source, int convert, char *
*/
PHP_METHOD(Phar, convertToTar)
{
char *error, *ext = NULL;
char *ext = NULL;
php_uint32 flags;
long method = 0;
int ext_len = 0;
@ -1813,7 +1812,7 @@ PHP_METHOD(Phar, convertToTar)
*/
PHP_METHOD(Phar, convertToZip)
{
char *error, *ext = NULL;
char *ext = NULL;
int ext_len = 0;
PHAR_ARCHIVE_OBJECT();
@ -1859,7 +1858,7 @@ PHP_METHOD(Phar, convertToZip)
*/
PHP_METHOD(Phar, convertToPhar)
{
char *error, *ext = NULL;
char *ext = NULL;
php_uint32 flags;
long method = 0;
int ext_len = 0;

5
ext/phar/util.c

@ -642,10 +642,9 @@ int phar_create_writeable_entry(phar_archive_data *phar, phar_entry_info *entry,
} else if (php_stream_is(*(php_stream**)entry->fp->abstract, PHP_STREAM_IS_STDIO)) {
php_stream_truncate_set_size(*(php_stream**)entry->fp->abstract, 0);
} else {
efree(*ret);
*ret = NULL;
if (error) {
spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", fname);
spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", phar->fname);
}
return FAILURE;
}
@ -926,7 +925,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, NULL)) {
break;
}
if (keylen >= path_len || strncmp(key, path, keylen)) {
if ((int)keylen >= path_len || strncmp(key, path, keylen)) {
continue;
} else {
char *test;

Loading…
Cancel
Save