Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 1, 2010
  1. QDict: Introduce qdict_get_try_bool()

    Luiz Capitulino authored
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  2. QDict: Introduce new iteration API

    Luiz Capitulino authored
    It's composed of functions qdict_first() and qdict_next(), plus
    functions to access QDictEntry values.
    
    This API was suggested by Markus Armbruster <armbru@redhat.com> and
    it offers full control over the iteration process.
    
    The usage is simple, the following example prints all keys in 'qdict'
    (it's hopefully better than any English description):
    
       QDict *qdict;
       const QDictEntry *ent;
    
       [...]
    
       for (ent = qdict_first(qdict); ent; ent = qdict_next(qdict, ent)) {
            printf("%s ", qdict_entry_key(ent));
        }
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  3. QDict: Introduce functions to retrieve QDictEntry values

    Luiz Capitulino authored
    Next commit will introduce a new QDict iteration API which
    returns QDictEntry entries, but we don't want users to directly
    access its members since QDictEntry should be private to QDict.
    
    In the near future this kind of data type will be turned into a
    forward reference.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  4. QDict: Small terminology change

    Luiz Capitulino authored
    Let's call a 'hash' only what is returned by our hash function,
    anything else is a 'bucket'.
    
    This helps avoiding confusion with regard to how we traverse
    our table.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  5. QDict: Rename 'err_value'

    Luiz Capitulino authored
    A missing key is not an error.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Commits on May 19, 2010
  1. Fix qtypes' licenses

    Luiz Capitulino authored
    - Change from GPL to LGPL
    - Add license text when missing
    - Minor cosmetic changes to make all headers look the same
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Commits on Mar 18, 2010
  1. @blueswirl

    Replace assert(0) with abort() or cpu_abort()

    blueswirl authored
    When building with -DNDEBUG, assert(0) will not stop execution
    so it must not be used for abnormal termination.
    
    Use cpu_abort() when in CPU context, abort() otherwise.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Commits on Mar 13, 2010
  1. @blueswirl

    Fix build with -DNDEBUG in CFLAGS

    blueswirl authored
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Commits on Feb 3, 2010
  1. QDict: New qdict_get_double()

    Markus Armbruster authored Anthony Liguori committed
    Helper function just like qdict_get_int(), just for QFloat/double.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Jan 26, 2010
  1. QDict: Introduce qdict_get_qdict()

    Luiz Capitulino authored Anthony Liguori committed
    A helper to retrieve a QDict from a QDict.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Dec 18, 2009
  1. QDict: Fix size update

    Luiz Capitulino authored Anthony Liguori committed
    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>
Commits on Dec 12, 2009
  1. QDict: Introduce qdict_get_qlist()

    Luiz Capitulino authored Anthony Liguori committed
    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>
  2. QDict: Introduce qdict_get_qbool()

    Luiz Capitulino authored Anthony Liguori committed
    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>
Commits on Nov 17, 2009
  1. QDict: Introduce qdict_iter()

    Luiz Capitulino authored Anthony Liguori committed
    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>
Commits on Sep 12, 2009
  1. @blueswirl

    Fix sys-queue.h conflict for good

    blueswirl authored
    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 15cc923,
    f40d753,
    96555a9 and
    3990d09 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>
Commits on Sep 4, 2009
  1. @blueswirl

    Shuffle lines to avoid gcc 3 warning about redundant redeclaration

    blueswirl authored
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  2. Introduce QDict

    Luiz Capitulino authored Anthony Liguori committed
    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>
Something went wrong with that request. Please try again.