~ubuntu-branches/ubuntu/wily/pyzmq/wily

« back to all changes in this revision

Viewing changes to zmq/utils/pyversion_compat.h

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-02-24 19:23:15 UTC
  • mfrom: (1.2.1) (9 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20130224192315-qhmwp3m3ymk8r60d
Tags: 2.2.0.1-1
* New upstream release
* relicense debian packaging to LGPL-3
* update watch file to use github directly
  thanks to Bart Martens for the file
* add autopkgtests
* drop obsolete DM-Upload-Allowed
* bump standard to 3.9.4, no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "Python.h"
2
2
 
3
3
#if PY_VERSION_HEX < 0x02070000
4
 
    #if PY_VERSION_HEX < 0x02060000
5
 
        #define PyObject_CheckBuffer(object) (0)
6
 
 
7
 
        #define PyObject_GetBuffer(obj, view, flags) (PyErr_SetString(PyExc_NotImplementedError, \
8
 
                        "new buffer interface is not available"), -1)
9
 
        #define PyBuffer_FillInfo(view, obj, buf, len, readonly, flags) (PyErr_SetString(PyExc_NotImplementedError, \
10
 
                    "new buffer interface is not available"), -1)
11
 
        #define PyBuffer_Release(obj) (PyErr_SetString(PyExc_NotImplementedError, \
12
 
                        "new buffer interface is not available"), -1)
13
 
        // Bytes->String
14
 
        #define PyBytes_FromStringAndSize PyString_FromStringAndSize
15
 
        #define PyBytes_FromString PyString_FromString
16
 
        #define PyBytes_AsString PyString_AsString
17
 
        #define PyBytes_Size PyString_Size
18
 
    #endif
19
 
 
20
4
    #define PyMemoryView_FromBuffer(info) (PyErr_SetString(PyExc_NotImplementedError, \
21
5
                    "new buffer interface is not available"), (PyObject *)NULL)
22
6
    #define PyMemoryView_FromObject(object)     (PyErr_SetString(PyExc_NotImplementedError, \