Skip to content

Commit 7d202a9

Browse files
committed
e/c/libzip.bas: fix types to match zip.bi
zip.bi was redefined in 2015, match those types to enable the example to compile
1 parent 7549ea7 commit 7d202a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/compression/libzip.bas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ End Sub
2424

2525
'' Asks libzip for information on file number 'i' in the .zip file,
2626
'' and then extracts it, while creating directories as needed.
27-
Private Sub unpack_zip_file(ByVal zip As zip Ptr, ByVal i As Integer)
27+
Private Sub unpack_zip_file(ByVal zip As zip_t Ptr, ByVal i As Integer)
2828
#define BUFFER_SIZE (1024 * 512)
2929
Static As UByte chunk(0 To (BUFFER_SIZE - 1))
3030
#define buffer (@chunk(0))
@@ -58,7 +58,7 @@ Private Sub unpack_zip_file(ByVal zip As zip Ptr, ByVal i As Integer)
5858
End If
5959

6060
'' Input for the file comes from libzip
61-
Dim As zip_file Ptr fi = zip_fopen_index(zip, i, 0)
61+
Dim As zip_file_t Ptr fi = zip_fopen_index(zip, i, 0)
6262
Do
6363
'' Write out the file content as returned by zip_fread(), which
6464
'' also does the decoding and everything.
@@ -88,7 +88,7 @@ Private Sub unpack_zip_file(ByVal zip As zip Ptr, ByVal i As Integer)
8888
End Sub
8989

9090
Sub unpack_zip(ByRef archive As String)
91-
Dim As zip Ptr zip = zip_open(archive, ZIP_CHECKCONS, NULL)
91+
Dim As zip_t Ptr zip = zip_open(archive, ZIP_CHECKCONS, NULL)
9292
If (zip = NULL) Then
9393
Print "could not open input file " & archive
9494
Return

0 commit comments

Comments
 (0)