~ubuntu-branches/ubuntu/trusty/pygpgme/trusty-proposed

« back to all changes in this revision

Viewing changes to src/pycompat.h

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Di Ciurcio Filho
  • Date: 2009-07-16 19:30:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090716193000-3bdzvj2oh58z7h24
Tags: upstream-0.1+bzr20090429
ImportĀ upstreamĀ versionĀ 0.1+bzr20090429

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef PYGPGME_COMPAT_H
 
3
#define PYGPGME_COMPAT_H
 
4
 
 
5
#if PY_VERSION_HEX < 0x02060000
 
6
 
 
7
#  define PyVarObject_HEAD_INIT(type, size) \
 
8
          PyObject_HEAD_INIT(type) size,
 
9
#  define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
 
10
 
 
11
 
 
12
#  define PyBytesObject PyStringObject
 
13
#  define PyBytes_Type PyString_Type
 
14
 
 
15
#  define PyBytes_Check PyString_Check
 
16
#  define PyBytes_CheckExact PyString_CheckExact 
 
17
#  define PyBytes_CHECK_INTERNED PyString_CHECK_INTERNED
 
18
#  define PyBytes_AS_STRING PyString_AS_STRING
 
19
#  define PyBytes_GET_SIZE PyString_GET_SIZE
 
20
#  define Py_TPFLAGS_BYTES_SUBCLASS Py_TPFLAGS_STRING_SUBCLASS
 
21
 
 
22
#  define PyBytes_FromStringAndSize PyString_FromStringAndSize
 
23
#  define PyBytes_FromString PyString_FromString
 
24
#  define PyBytes_FromFormatV PyString_FromFormatV
 
25
#  define PyBytes_FromFormat PyString_FromFormat
 
26
#  define PyBytes_Size PyString_Size
 
27
#  define PyBytes_AsString PyString_AsString
 
28
#  define PyBytes_Repr PyString_Repr
 
29
#  define PyBytes_Concat PyString_Concat
 
30
#  define PyBytes_ConcatAndDel PyString_ConcatAndDel
 
31
#  define PyBytes_Format PyString_Format
 
32
#  define PyBytes_DecodeEscape PyString_DecodeEscape
 
33
#  define PyBytes_Decode PyString_Decode
 
34
#  define PyBytes_Encode PyString_Encode
 
35
#  define PyBytes_AsEncodedObject PyString_AsEncodedObject
 
36
#  define PyBytes_AsEncodedString PyString_AsEncodedString
 
37
#  define PyBytes_AsDecodedObject PyString_AsDecodedObject
 
38
#  define PyBytes_AsDecodedString PyString_AsDecodedString
 
39
#  define PyBytes_AsStringAndSize PyString_AsStringAndSize
 
40
 
 
41
#endif
 
42
 
 
43
#if PY_VERSION_HEX > 0x03000000
 
44
/* Ugh.  I'll need to fix this code, but the text/bytes changes take
 
45
   precedence. */
 
46
#  include <intobject.h>
 
47
#endif
 
48
 
 
49
#endif /* PYGPGME_COMPAT_H */