.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-POOL" "3" "01/18/2018" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-POOL" "3" "06/27/2018" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
+\fBId pool_solvable2id(const Pool *\fR\fIpool\fR\fB, Solvable *\fR\fIs\fR\fB)\fR;
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Convert a pointer to the solvable data into a solvable Id\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBconst char *pool_solvid2str(Pool *\fR\fIpool\fR\fB, Id\fR \fIp\fR\fB)\fR;
.fi
.if n \{\
pointer may become invalid if new solvables are created or old solvables
deleted, because the array storing all solvables may get reallocated.
+ Id pool_solvable2id(const Pool *pool, Solvable *s);
+
+Convert a pointer to the solvable data into a solvable Id.
+
const char *pool_solvid2str(Pool *pool, Id p);
Return a string representing the solvable with the Id _p_. The string will
{
return pool->solvables + p;
}
+static inline Id pool_solvable2id(const Pool *pool, Solvable *s)
+{
+ return s - pool->solvables;
+}
extern const char *pool_solvable2str(Pool *pool, Solvable *s);
static inline const char *pool_solvid2str(Pool *pool, Id p)