Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Convert every list attributes to hash tables
Baptiste Daroussin committed 13 years ago
commit d1082c11d0136ed10190a6101b7488a3f4bb3923
parent 272c2d9
1 file changed +11 -0
modified libpkg/pkg.c
@@ -376,6 +376,17 @@ pkg_set_from_file(struct pkg *pkg, pkg_attr attr, const char *path)
	return (ret);
}

+
#define HASH_NEXT(hash, data) do {            \
+
		if (data == NULL)             \
+
			data = hash;          \
+
		else                          \
+
			data = data->hh.next; \
+
		if (data == NULL)             \
+
			return (EPKG_END);    \
+
		else                          \
+
			return (EPKG_OK);     \
+
	} while (0)
+

int
pkg_licenses(struct pkg *pkg, struct pkg_license **l)
{