X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fzip-reader.h;h=d245e3c6d3eb776f03da770271fba7a946b32c22;hb=e7913c62251710319b06c50702c5db9afb612be5;hp=b02981d365f81a9235f7827a6276ba089e9f7a86;hpb=794fc7f31c6748f0f19db7d9b5e8345f00db86c3;p=pspp diff --git a/src/libpspp/zip-reader.h b/src/libpspp/zip-reader.h index b02981d365..d245e3c6d3 100644 --- a/src/libpspp/zip-reader.h +++ b/src/libpspp/zip-reader.h @@ -18,6 +18,8 @@ #ifndef ZIP_READER_H #define ZIP_READER_H 1 +#include +#include #include "libpspp/compiler.h" struct zip_member; @@ -26,12 +28,15 @@ struct string; /* Create zip reader to read the file called FILENAME. If successful, stores the new zip_reader in *ZRP and returns NULL; on error, returns an error - message that the caller must free and stores NULL in *ZRP. */ + message that the caller must free and stores NULL in *ZRP. + + The client must eventually unref *ZRP. */ char *zip_reader_create (const char *filename, struct zip_reader **zrp) WARN_UNUSED_RESULT; -/* Destroy the zip reader */ -void zip_reader_destroy (struct zip_reader *zr); +/* Reference counting. */ +struct zip_reader *zip_reader_ref (const struct zip_reader *); +void zip_reader_unref (struct zip_reader *zr); /* Returns the name of ZR's member IDX, IDX >= 0. Returns NULL if ZR has fewer than (IDX + 1) members. */