~jderose/ubuntu/precise/dbus-python/oneiric-backport

« back to all changes in this revision

Viewing changes to _dbus_bindings/types-internal.h

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2012-01-12 14:47:33 UTC
  • Revision ID: package-import@ubuntu.com-20120112144733-xtfbmgw30h0j40d2
Tags: 0.84.0-2ubuntu1
* debian/patches:
  - since-0.84.0.patch: Upstream unreleased changes from git tag
    dbus-python-0.84.0 to HEAD.  This is a precursor to the following.
  - python3-support.patch: Upstream unreleased changes from git
    `python3` branch for supporting Python 3. (LP: #893091)
* debian/rules: Enable the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <Python.h>
27
27
#include <stdint.h>
28
28
 
 
29
/* In Python2 >= 2.6 this aliases PyString to PyBytes.  There is no PyString
 
30
 * in Python 3, so this allows the C extension to be compilable in both Python
 
31
 * versions.
 
32
 */
 
33
#include <bytesobject.h>
 
34
 
 
35
/* In Python 2.x, we need this to define the type of PyLongObject */
 
36
#ifndef PY3
 
37
#include <longintrepr.h>
 
38
#endif
 
39
 
29
40
#include "dbus_bindings-internal.h"
30
41
 
31
42
#ifndef DBUS_BINDINGS_TYPES_INTERNAL_H
32
43
#define DBUS_BINDINGS_TYPES_INTERNAL_H
33
44
 
 
45
#ifndef PY3
34
46
extern PyTypeObject DBusPyIntBase_Type;
35
47
DEFINE_CHECK(DBusPyIntBase)
36
48
 
38
50
    PyIntObject base;
39
51
    long variant_level;
40
52
} DBusPyIntBase;
 
53
#endif
41
54
 
42
55
extern PyTypeObject DBusPyLongBase_Type;
43
56
DEFINE_CHECK(DBusPyLongBase)
58
71
extern PyTypeObject DBusPyStrBase_Type;
59
72
DEFINE_CHECK(DBusPyStrBase)
60
73
 
 
74
#ifdef PY3
 
75
extern PyTypeObject DBusPyBytesBase_Type;
 
76
DEFINE_CHECK(DBusPyBytesBase)
 
77
#endif
 
78
 
61
79
dbus_int16_t dbus_py_int16_range_check(PyObject *);
62
80
dbus_uint16_t dbus_py_uint16_range_check(PyObject *);
63
81
dbus_int32_t dbus_py_int32_range_check(PyObject *);