summaryrefslogtreecommitdiff
path: root/_dbus_bindings/message-append.c
Commit message (Collapse)AuthorAgeFilesLines
* Use DBusBasicValue instead of reinventing it, if dbus is new enoughSimon McVittie2012-02-241-32/+24
| | | | | If we don't find it, continue to reinvent it, but move the reinvention to an internal header so it's at least the same in both files that want it.
* Add INTORLONG_CHECK macro so we don't have to conditionalize PyInt_CheckSimon McVittie2012-01-111-5/+3
|
* - Added back the missing PY3PORT.rst file, with updates.Barry Warsaw2011-12-151-20/+6
| | | | | | | - Disallow appending unicode objects with 'y' (bytes) signatures. This now requires either a bytes object or an integer. Update the tests to reflect - this change. - Fix broken __all__ in Python 3.
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-151-37/+158
|
* First round of PyInt -> PyLong changes. These are only compatible with PythonBarry Warsaw2011-12-141-5/+16
| | | | | | | 2, since there are still some unconditional PyInt calls, which are not valid in Python 3. However, it lays the framework for conditionalizing on Python 3 and using only PyLong in that case. Where it doesn't matter, PyLong is used unconditionally.
* Add error checking to dbus_py_variant_level_get() and call sites.Barry Warsaw2011-12-141-0/+4
|
* In preparation for Python 3 support, use the Python 2 PyBytes aliases for theBarry Warsaw2011-12-141-62/+66
| | | | | PyString API. This makes the code compilable in Python 2.x (x >= 6) and Python 3.
* - Add a few missing Py_TYPE() changes for Python 3 compatibility.Barry Warsaw2011-12-131-1/+1
| | | | - De-tabbify a few instances that "make check" complains about.
* Adjust debug messagesBarry Warsaw2011-12-131-3/+3
| | | | | | Part of a patch for Python 3 compatibility. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Use Py_TYPE() rather than thing->ob_type, for Python 3 portabilitySimon McVittie2011-12-131-1/+1
| | | | | | Based on part of a patch from Barry Warsaw. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Don't leak UTF-8 string if serializing a unicode object fails with OOMBarry Warsaw2011-12-131-0/+1
| | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Bump dbus dependency to 1.4 so we can make decent error handling mandatorySimon McVittie2011-11-151-4/+0
|
* Added Unix Fd support to dbus-pythonElvis Pfützenreuter2011-05-181-0/+33
|
* Use Py_CLEAR for greater robustnessSimon McVittie2010-12-021-30/+29
|
* dbus_py_Message_append: avoid looking beyond the valid part of a signatureSimon McVittie2010-12-021-14/+22
| | | | | Similar reasoning: we don't even want to look where the iterator is pointing if the last call to dbus_signature_iter_next indicated "no more".
* _message_iter_append_multi: bail out safely if a struct isn't filledSimon McVittie2010-12-021-0/+9
| | | | | | In newer versions of libdbus, calling dbus_signature_iter_get_current_type when the iterator is pointing at the ')' of a struct trips an assertion failure, rather than just returning INVALID.
* Use dbus_message_iter_abandon_container to bail out, if supportedSimon McVittie2010-12-021-2/+20
| | | | | This avoids (potentially fatal) warnings, with newer libdbus; it'll only work if we were compiled against libdbus >= 1.3.0.
* _message_iter_append_multi: assert that mode is what we expectSimon McVittie2010-12-021-0/+5
|
* Fix compilation in 64-bit architectureElvis Pfützenreuter2010-10-181-1/+1
|
* Relicense Collabora code under the MIT/X11 license proposed for dbus core, ↵Simon McVittie2007-09-271-15/+18
| | | | removing all references to the LGPL as a result
* Remove trailing whitespace in C sourceSimon McVittie2007-04-241-3/+3
|
* Fix memory leak where Struct, _LongBase, _StrBase, String leaked their ↵Simon McVittie2007-02-071-2/+4
| | | | | | | | | | | | | | __dict__ on deallocation. * Use a fixed-size struct for String (unicode objects are in fact fixed-size) and store its variant_level that way. * Don't store Struct, _LongBase, _StrBase variant_level and Struct signature in a __dict__, but instead have a global dict mapping object IDs to variant levels, and a global dict mapping Struct IDs to signatures. This is a bit strange, but easier than correctly freeing the __dict__ (which is stored at the end of a variable-length struct, so somewhat hard to get at). * With this change, allocating objects in a loop no longer leaks memory, and neither does the test case supplied by Luka Renko.
* dbus, _dbus_bindings, _dbus_glib_bindings: remove accidentally duplicated ↵Simon McVittie2007-01-251-2/+0
| | | | lines in license statement
* Switch types from int to Py_ssize_t to be compatible with Python 2.5 on ↵Simon McVittie2007-01-161-4/+4
| | | | 64-bit archs
* Ensure we put the right number of items in a struct or message and add test ↵Simon McVittie2007-01-161-19/+36
| | | | | | | | | | | cases. This avoids us getting kicked off the bus when trying to put the wrong number of things in a struct - this used to happen, but was masked by the fact that the tests ran with service activation, so the service was just killed and reactivated. Forthcoming changes to get_object make this automatic reactivation not happen (messages will be directed to the unique name by default, so stateful communication can work).
* Add special case to serialization: objects with a __dbus_object_path__ ↵Simon McVittie2007-01-101-24/+96
| | | | attribute are serialized as that object path. Add that attribute to ProxyObject, dbus.Interface and dbus.service.Object.
* When putting a ByteArray into a variant array, serialise it as an array of ↵Simon McVittie2007-01-091-1/+25
| | | | variants containing byte, not an array of variants containing string
* message-append.c, message-get-args.c: Turn off debug messages even when ↵Simon McVittie2006-12-131-0/+1
| | | | debugging other things, they're too verbose
* Whitespace consistency: Don't put a space between function name and ↵Simon McVittie2006-12-111-46/+46
| | | | parentheses around arguments
* Convert generic glue, main loop integration, message append/get_args, ↵Simon McVittie2006-12-111-0/+975
validation into separate translation units - no *-impl.h remaining