summaryrefslogtreecommitdiff
path: root/_dbus_bindings/abstract.c
Commit message (Collapse)AuthorAgeFilesLines
* Always include dbus_bindings-internal.h firstSimon McVittie2016-03-051-1/+2
| | | | | | | | | | | | This file includes <Python.h>, with some #defines that affect the interpretation of the Python headers (PY_SSIZE_T_CLEAN, PY_SIZE_T_CLEAN). In particular, <Python.h> transitively includes pyconfig.h, which defines _GNU_SOURCE, altering the version of struct stat used; this is potentially a problem if a struct stat is shared between files, although in practice we don't do that. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749133
* Don't include stdint.hSimon McVittie2012-07-041-2/+0
| | | | | | Every use here turns out to be unnecessary, some compilers *still* don't have it after more than a decade in ISO C, and if we need fixed-length integer types we can use the ones from D-Bus.
* Fix ref leak in dbus_py_variant_level_setSimon McVittie2012-03-121-0/+2
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47108 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Use native 'int' (whatever that means) for variant_level etc.Simon McVittie2012-01-111-6/+6
| | | | | This reverts the Python 2 API to be in terms of PyInt, leaving the Python 3 API in terms of PyLong (which is called 'int' in Python code).
* DBusPythonString base class: use "native str" as base class instead of ↵Simon McVittie2012-01-111-11/+5
| | | | reinventing it
* Consistency; clean-up.Barry Warsaw2011-12-151-4/+4
|
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-151-12/+170
|
* First round of PyInt -> PyLong changes. These are only compatible with PythonBarry Warsaw2011-12-141-5/+15
| | | | | | | 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-3/+19
|
* In preparation for Python 3 support, use the Python 2 PyBytes aliases for theBarry Warsaw2011-12-141-10/+11
| | | | | PyString API. This makes the code compilable in Python 2.x (x >= 6) and Python 3.
* In preparation for Python 3 support, all reprs now return unicodes, which isBarry Warsaw2011-12-141-24/+24
| | | | | legal in Python 2 also. Use fancy REPR macro and the %V format code for cross-Python compatibility.
* Additional PyObject_HEAD_INIT -> PyVarObject_HEAD_INIT changes in preparationBarry Warsaw2011-12-131-8/+4
| | | | for Python 3 support.
* Use Py_TYPE() rather than thing->ob_type, for Python 3 portabilitySimon McVittie2011-12-131-8/+8
| | | | | | Based on part of a patch from Barry Warsaw. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* fd.o #23831: make sure to ref types passed to PyModule_AddObjectSimon McVittie2010-12-021-0/+1
| | | | | | | This avoids these static types wrongly being deallocated. Python implements static types as having one initial reference, which is never meant to be released, but if you get your refcounting wrong they'll be "deallocated" (causing a crash) during Py_Finalize.
* Use Py_CLEAR for greater robustnessSimon McVittie2010-12-021-18/+18
|
* 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-2/+2
|
* Actually commit the numerous copyright-statement changes.Simon McVittie2007-02-071-8/+8
|
* Fix memory leak where Struct, _LongBase, _StrBase, String leaked their ↵Simon McVittie2007-02-071-36/+158
| | | | | | | | | | | | | | __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.
* Don't leak memory in _StringBase and _LongBase repr()Simon McVittie2007-02-051-2/+10
|
* Switch _IntBase back to using generic alloc/free implementation rather than ↵Simon McVittie2007-02-051-1/+2
| | | | half-participating in the int free list (which would result in _IntBase instances leaking)
* dbus, _dbus_bindings, _dbus_glib_bindings: remove accidentally duplicated ↵Simon McVittie2007-01-251-2/+0
| | | | lines in license statement
* Add special case to serialization: objects with a __dbus_object_path__ ↵Simon McVittie2007-01-101-0/+4
| | | | attribute are serialized as that object path. Add that attribute to ProxyObject, dbus.Interface and dbus.service.Object.
* Improve various type docstringsSimon McVittie2006-12-211-4/+24
|
* Separate out remaining types (abstract, bytes, containers, int, float, ↵Simon McVittie2006-12-111-0/+508
signature, string) into separate translation units