summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* QDict: Fix size updateLuiz Capitulino2009-12-191-2/+1
| | | | | | | | | | Key replacement should not update the dictionary's size. This commit also adds a test for the bug. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 29ec3156ee66b6e2553a0adb2f35cb143edddc5f)
* QDict: Introduce qdict_get_qlist()Luiz Capitulino2009-12-121-0/+13
| | | | | | | | A helper function to get a QList from a QDict. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f2e1750803240ec8b78ae126af0d54f7896ee11d)
* QDict: Introduce qdict_get_qbool()Luiz Capitulino2009-12-121-0/+15
| | | | | | | | | This is a helper function that does type checking before retrieving a QBool from the dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit cd4dde36ae8e7bd8e02839533c5708011bf994cf)
* QDict: Introduce qdict_iter()Luiz Capitulino2009-11-171-0/+19
| | | | | | | | This adds iterator support to QDict, it will be used by the (to be introduced) QError module. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix sys-queue.h conflict for goodBlue Swirl2009-09-121-7/+7
| | | | | | | | | | | | | | | Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Shuffle lines to avoid gcc 3 warning about redundant redeclarationBlue Swirl2009-09-041-6/+6
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Introduce QDictLuiz Capitulino2009-09-041-0/+297
QDict is a high-level dictionary data type that can be used to store a collection of QObjects. A unique key is associated with only one QObject. The following functions are available: - qdict_new() Create a new QDict - qdict_put() Add a new 'key:object' pair - qdict_get() Get the QObject of a given key - qdict_del() Delete a 'key:object' pair - qdict_size() Return the size of the dictionary - qdict_haskey() Check if a given 'key' exists Some high-level helpers to operate on QStrings and QInts objects are also provided. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>