~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_chk_map_pyx.pyx

  • Committer: John Arbash Meinel
  • Date: 2009-10-21 21:27:19 UTC
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091021212719-05zh4t7oo5kaird3
More cleanups and clarifications.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    char *PyString_AS_STRING_ptr "PyString_AS_STRING" (PyObject *s)
52
52
    object PyString_FromStringAndSize(char*, Py_ssize_t)
53
53
 
54
 
# It seems we need to import the definitions so that the pyrex compiler has
55
 
# local names to access them.
 
54
# cimport all of the definitions we will need to access
56
55
from _static_tuple_c cimport StaticTuple,\
57
56
    import_static_tuple_c, StaticTuple_New, \
58
57
    StaticTuple_Intern, StaticTuple_SET_ITEM, StaticTuple_CheckExact
59
58
 
60
59
cdef extern from "_static_tuple_c.h":
61
 
    # Defined explicitly rathert than cimport ing. Using cimport the type for
62
 
    # PyObject is a different class that happens to have the same name...
 
60
    # Defined explicitly rather than cimport-ing. Trying to use cimport, the
 
61
    # type for PyObject is a different class that happens to have the same
 
62
    # name...
63
63
    PyObject * StaticTuple_GET_ITEM_ptr "StaticTuple_GET_ITEM" (StaticTuple,
64
64
                                                                Py_ssize_t)
65
65
 
71
71
    uLong crc32(uLong crc, Bytef *buf, uInt len)
72
72
 
73
73
 
74
 
 
75
 
# This sets up the StaticTuple C_API functionality
 
74
# Set up the StaticTuple C_API functionality
76
75
import_static_tuple_c()
77
76
 
78
77
cdef object _LeafNode