diff options
author | Xinchen Hui <laruence@gmail.com> | 2013-12-15 16:55:29 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2013-12-15 16:55:29 +0800 |
commit | 5eb8d9d70009c0bf9bfbbf511f2713e64dc8ee83 (patch) | |
tree | 2480a26e79d85b4b7f2eacb5a2187eb13f029094 /ext/zip/lib/zip_add.c | |
parent | 10964b78548a5878254f5aa75f4cfdcedb0543bc (diff) | |
parent | 904721189ff949c67795ec418f04b67951cbd57b (diff) | |
download | php-git-5eb8d9d70009c0bf9bfbbf511f2713e64dc8ee83.tar.gz |
Merge branch 'PHP-5.6' of https://git.php.net/push/php-src into PHP-5.6
Diffstat (limited to 'ext/zip/lib/zip_add.c')
-rw-r--r-- | ext/zip/lib/zip_add.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/zip/lib/zip_add.c b/ext/zip/lib/zip_add.c index 6067abbac4..4bce3fd4af 100644 --- a/ext/zip/lib/zip_add.c +++ b/ext/zip/lib/zip_add.c @@ -1,6 +1,6 @@ /* zip_add.c -- add file via callback function - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <libzip@nih.at> @@ -33,6 +33,7 @@ +#define _ZIP_COMPILING_DEPRECATED #include "zipint.h" @@ -44,13 +45,8 @@ ZIP_UINT64_MAX, and each entry is larger than 2 bytes. */ -ZIP_EXTERN(zip_int64_t) +ZIP_EXTERN zip_int64_t zip_add(struct zip *za, const char *name, struct zip_source *source) { - if (name == NULL || source == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - return _zip_replace(za, ZIP_UINT64_MAX, name, source); + return zip_file_add(za, name, source, 0); } |