3 .\" Author: [see the "Author" section]
4 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
10 .TH "LIBSOLV" "3" "09/20/2013" "libsolv" "LIBSOLV"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 libsolv \- package dependency solver library using a satisfiability algorithm
34 The libsolv documentation is split into multiple parts:
36 \fBlibsolv\-history\fR
38 how the libsolv library came into existence
41 \fBlibsolv\-constantids\fR
43 fixed Ids for often used strings
46 \fBlibsolv\-bindings\fR
48 access libsolv from perl/python/ruby
53 libsolv\(cqs pool object
55 .SH "POINTER VALIDITY"
57 Note that all pointers to objects that have an Id have only a limited validity period, with the exception of Repo pointers\&. There are only guaranteed to be valid until a new object of that type is added or an object of that type is removed\&. Thus pointers to Solvable objects are only valid until another solvable is created, because adding a Solvable may relocate the Pool\(cqs Solvable array\&. This is also true for Pool strings, you should use solv_strdup() to create a copy of the string if you want to use it at some later time\&. You should use the Ids in the code and not the pointers, except for short times where you know that the pointer is safe\&.
59 Note also that the data lookup functions or the dataiterator also return values with limited lifetime, this is especially true for data stored in the paged data segment of solv files\&. This is normally data that consists of big strings like package descriptions or is not often needed like package checksums\&. Thus looking up a description of a solvable and then looking up the description of a different solvable or even the checksum of the same solvable may invalidate the first result\&. (The dataiterator supports a dataiterator_strdup() function to create a safe copy\&.)
61 The language bindings already deal with pointer validity, so you do not have to worry about this issue when using the bindings\&.
64 Michael Schroeder <mls@suse\&.de>