]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/private.h
tal: allow notifiers on NULL.
[ccan] / ccan / opt / private.h
index 12c569311b4a62d880981323de1eac82aff8ca77..47b8c4e056eead80956103965c1324033da9b05a 100644 (file)
@@ -1,4 +1,4 @@
-/* Licensed under GPLv3+ - see LICENSE file for details */
+/* Licensed under GPLv2+ - see LICENSE file for details */
 #ifndef CCAN_OPT_PRIVATE_H
 #define CCAN_OPT_PRIVATE_H
 
@@ -14,6 +14,13 @@ const char *next_sopt(const char *names, unsigned *i);
 const char *first_lopt(unsigned *i, unsigned *len);
 const char *next_lopt(const char *p, unsigned *i, unsigned *len);
 
+struct opt_alloc {
+       void *(*alloc)(size_t size);
+       void *(*realloc)(void *ptr, size_t size);
+       void (*free)(void *ptr);
+};
+extern struct opt_alloc opt_alloc;
+
 int parse_one(int *argc, char *argv[], enum opt_type is_early, unsigned *offset,
              void (*errlog)(const char *fmt, ...));