]> git.draconx.ca Git - upkg.git/blobdiff - src/upkg.h
libupkg: Add a destructor that is called on package close.
[upkg.git] / src / upkg.h
index 9fc80034af962ba894533d421f2166636ec2e50e..c5da628b1660df074ad6cef64dd6d2234cef799f 100644 (file)
@@ -91,7 +91,8 @@ struct upkg_file {
 /* Default I/O operations for ordinary files. */
 extern const struct upkg_file_ops upkg_default_fops;
 
-struct upkg *upkg_open(void *handle, const struct upkg_file_ops *fops);
+struct upkg *upkg_open(void *handle, const struct upkg_file_ops *fops,
+                       int (*destructor)(void *handle));
 struct upkg *upkg_fopen(const char *path);
 int upkg_close(struct upkg *pkg);