@@ -85,13 +85,13 @@ static int ar_read(lua_State *L) {
85
85
{ NULL , NULL }
86
86
};
87
87
static named_setter compression_names [] = {
88
- { "all" , archive_read_support_compression_all },
89
- { "bzip2" , archive_read_support_compression_bzip2 },
90
- { "compress" , archive_read_support_compression_compress },
91
- { "gzip" , archive_read_support_compression_gzip },
92
- { "lzma" , archive_read_support_compression_lzma },
93
- { "none" , archive_read_support_compression_none },
94
- { "xz" , archive_read_support_compression_xz },
88
+ { "all" , archive_read_support_filter_all },
89
+ { "bzip2" , archive_read_support_filter_bzip2 },
90
+ { "compress" , archive_read_support_filter_compress },
91
+ { "gzip" , archive_read_support_filter_gzip },
92
+ { "lzma" , archive_read_support_filter_lzma },
93
+ { "none" , archive_read_support_filter_none },
94
+ { "xz" , archive_read_support_filter_xz },
95
95
{ NULL , NULL }
96
96
};
97
97
@@ -118,7 +118,7 @@ static int ar_read(lua_State *L) {
118
118
// Do it the easy way for now... perhaps in the future we will
119
119
// have a parameter to support toggling which algorithms are
120
120
// supported:
121
- if ( ARCHIVE_OK != archive_read_support_compression_all (* self_ref ) ) {
121
+ if ( ARCHIVE_OK != archive_read_support_filter_all (* self_ref ) ) {
122
122
err ("archive_read_support_compression_all: %s" , archive_error_string (* self_ref ));
123
123
}
124
124
if ( ARCHIVE_OK != archive_read_support_format_all (* self_ref ) ) {
@@ -197,7 +197,7 @@ static int ar_read_destroy(lua_State *L) {
197
197
198
198
if ( ARCHIVE_OK != archive_read_close (* self_ref ) ) {
199
199
lua_pushfstring (L , "archive_read_close: %s" , archive_error_string (* self_ref ));
200
- archive_read_finish (* self_ref );
200
+ archive_read_free (* self_ref );
201
201
__ref_count -- ;
202
202
* self_ref = NULL ;
203
203
lua_error (L );
@@ -210,8 +210,8 @@ static int ar_read_destroy(lua_State *L) {
210
210
lua_call (L , 2 , 1 ); // {self}, result
211
211
}
212
212
213
- if ( ARCHIVE_OK != archive_read_finish (* self_ref ) ) {
214
- luaL_error (L , "archive_read_finish : %s" , archive_error_string (* self_ref ));
213
+ if ( ARCHIVE_OK != archive_read_free (* self_ref ) ) {
214
+ luaL_error (L , "archive_read_free : %s" , archive_error_string (* self_ref ));
215
215
}
216
216
__ref_count -- ;
217
217
* self_ref = NULL ;
0 commit comments