Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : Make Pool* const where appropriate
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Mon, 22 Jun 2009 15:38:08 +0200
  • Message-id: <E1MIjit-0003Rb-L2@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 41791510de6c060151e479df3f4fc45f8da74b4b
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Mon Jun 22 15:38:08 2009 +0200

Make Pool* const where appropriate
---
src/poolid.c | 10 +++++-----
src/poolid.h | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/poolid.c b/src/poolid.c
index a0059e2..9ed14d1 100644
--- a/src/poolid.c
+++ b/src/poolid.c
@@ -121,7 +121,7 @@ rel2id(Pool *pool, Id name, Id evr, int flags, int create)
// for rels (returns name only) and strings
//
const char *
-id2str(Pool *pool, Id id)
+id2str(const Pool *pool, Id id)
{
if (ISRELDEP(id))
{
@@ -147,7 +147,7 @@ static const char *rels[] = {

// get operator for RelId
const char *
-id2rel(Pool *pool, Id id)
+id2rel(const Pool *pool, Id id)
{
Reldep *rd;
if (!ISRELDEP(id))
@@ -180,7 +180,7 @@ id2rel(Pool *pool, Id id)
// get e:v.r for Id
//
const char *
-id2evr(Pool *pool, Id id)
+id2evr(const Pool *pool, Id id)
{
Reldep *rd;
if (!ISRELDEP(id))
@@ -192,7 +192,7 @@ id2evr(Pool *pool, Id id)
}

static int
-dep2strlen(Pool *pool, Id id)
+dep2strlen(const Pool *pool, Id id)
{
int l = 0;

@@ -207,7 +207,7 @@ dep2strlen(Pool *pool, Id id)
}

static void
-dep2strcpy(Pool *pool, char *p, Id id, int oldrel)
+dep2strcpy(const Pool *pool, char *p, Id id, int oldrel)
{
while (ISRELDEP(id))
{
diff --git a/src/poolid.h b/src/poolid.h
index 5287ac5..698f7a7 100644
--- a/src/poolid.h
+++ b/src/poolid.h
@@ -28,10 +28,10 @@ typedef struct _Reldep {
extern Id str2id(Pool *pool, const char *, int);
extern Id strn2id(Pool *pool, const char *, unsigned int, int);
extern Id rel2id(Pool *pool, Id, Id, int, int);
-extern const char *id2str(Pool *pool, Id);
-extern const char *dep2str(Pool *pool, Id);
-extern const char *id2rel(Pool *pool, Id);
-extern const char *id2evr(Pool *pool, Id);
+extern const char *id2str(const Pool *pool, Id);
+extern const char *dep2str(Pool *pool, Id); /* might alloc tmpspace */
+extern const char *id2rel(const Pool *pool, Id);
+extern const char *id2evr(const Pool *pool, Id);

extern void pool_shrink_strings(Pool *pool);
extern void pool_shrink_rels(Pool *pool);
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages