~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Include/bytearrayobject.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t);
45
45
 
46
46
/* Macros, trading safety for speed */
47
 
#define PyByteArray_AS_STRING(self) (assert(PyByteArray_Check(self)),((PyByteArrayObject *)(self))->ob_bytes)
 
47
#define PyByteArray_AS_STRING(self) \
 
48
    (assert(PyByteArray_Check(self)), \
 
49
     Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string)
48
50
#define PyByteArray_GET_SIZE(self)  (assert(PyByteArray_Check(self)),Py_SIZE(self))
49
51
 
 
52
PyAPI_DATA(char) _PyByteArray_empty_string[];
 
53
 
50
54
#ifdef __cplusplus
51
55
}
52
56
#endif