summaryrefslogtreecommitdiffstats
path: root/qobject.h
Commit message (Collapse)AuthorAgeFilesLines
* json-parser: Fix potential NULL pointer segfaultStefan Weil2012-09-051-1/+1
| | | | | | | | | | | | | | | Report from smatch: json-parser.c:474 parse_object(62) error: potential null derefence 'dict'. json-parser.c:553 parse_array(75) error: potential null derefence 'list'. Label 'out' in json-parser.c can be called with list == NULL which is passed to QDECREF. Modify QDECREF to handle a NULL argument (inline function qobject_decref already handles them, too). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Fix qtypes' licensesLuiz Capitulino2010-05-191-2/+2
| | | | | | | | - 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>
* Introduce QErrorLuiz Capitulino2009-12-031-0/+1
| | | | | | | | | | | | | | | | QError is a high-level data type which represents an exception in QEMU, it stores the following error information: - class Error class name (eg. "ServiceUnavailable") - description A detailed error description, which can contain references to run-time error data - filename The file name of where the error occurred - line number The exact line number of the error - function The function name of where the error occurred - run-time data Any run-time error data Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add a QBool typeAnthony Liguori2009-11-171-0/+1
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add a QFloat datatypeAnthony Liguori2009-11-171-0/+1
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Properly escape QDECREF macro argumentsAnthony Liguori2009-11-171-1/+1
| | | | | | | QDECREF does not properly escape the macro arguments which can lead to unexpected syntax errors. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QListLuiz Capitulino2009-10-081-0/+1
| | | | | | | | | | | | | | | QList is a high-level data type that can be used to store QObjects in a singly-linked list. The following functions are available: - qlist_new() Create a new QList - qlist_append() Append a QObject to the list - qlist_iter() Iterate over stored QObjects Patchworks-ID: 35334 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QObject: Accept NULLLuiz Capitulino2009-10-081-4/+3
| | | | | | | | | | It is convenient that QDECREF() and QINCREF() accept the QObject parameter to be NULL, so that we don't duplicate 'if' tests in the callers. Patchworks-ID: 35332 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QDictLuiz Capitulino2009-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* Introduce QStringLuiz Capitulino2009-09-041-0/+1
| | | | | | | | | | | | | | | | QString is a high-level data type that can be used to represent C strings. The following functions are available: - qstring_from_str() Create a new QString - qstring_get_str() Get a pointer to the stored string Note that qstring_get_str() is too low-level for a data type like this, but it's interesting for quick read-only accesses. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QIntLuiz Capitulino2009-09-041-0/+1
| | | | | | | | | | | | | QInt is a high-level data type that can be used to represent integers, internally it stores an int64_t value. The following functions are available: - qint_from_int() Create a new QInt - qint_get_int() Get the stored integer Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce QObjectLuiz Capitulino2009-09-041-0/+106
This commit introduces the qobject.h header file, it contains basic QObject definitions and helper macros. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud