Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
constify more things
Eitan committed 15 years ago
commit b3d96a4a4a9f612bae6c4bff6c7eb37f959ba8b3
parent 045b450
2 files changed +5 -5
modified libpkg/pkg.c
@@ -11,7 +11,7 @@
#include "pkg_util.h"

pkg_t
-
pkg_type(struct pkg *pkg)
+
pkg_type(struct pkg const * const pkg)
{
	if (pkg == NULL) {
		ERROR_BAD_ARG("pkg");
@@ -22,7 +22,7 @@ pkg_type(struct pkg *pkg)
}

const char *
-
pkg_get(struct pkg *pkg, pkg_attr attr)
+
pkg_get(struct pkg const * const pkg, const pkg_attr attr)
{
	if (pkg == NULL) {
		ERROR_BAD_ARG("pkg");
@@ -38,7 +38,7 @@ pkg_get(struct pkg *pkg, pkg_attr attr)
}

int
-
pkg_set(struct pkg *pkg, pkg_attr attr, const char *value)
+
pkg_set(struct pkg * pkg, pkg_attr attr, const char *value)
{
	struct sbuf **sbuf;

modified libpkg/pkg.h
@@ -176,14 +176,14 @@ int pkg_open(struct pkg **p, const char *path);
 * @return the type of the package.
 * @warning returns PKG_NONE on error.
 */
-
pkg_t pkg_type(struct pkg *);
+
pkg_t pkg_type(struct pkg const * const);

/**
 * Generic getter for simple attributes.
 * @return NULL-terminated string.
 * @warning May return a NULL pointer.
 */
-
const char *pkg_get(struct pkg *, pkg_attr);
+
const char *pkg_get(struct pkg const * const , const pkg_attr);

/**
 * @return the size of the uncompressed package.