~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_static_tuple_c.pxd

  • Committer: John Arbash Meinel
  • Date: 2009-10-21 19:43:05 UTC
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091021194305-eso7vfaetsvmhgz6
Tweak some of the internals of _chk_map_pyx.pyx

Since we have a fixed type, we can use the StaticTuple_GET_ITEM macro.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
    # Steals a reference and val must be a valid type, no checking is done
38
38
    void StaticTuple_SET_ITEM(StaticTuple key, Py_ssize_t offset, object val)
39
 
    object StaticTuple_GET_ITEM(StaticTuple key, Py_ssize_t offset)
 
39
    # This isn't particularly useful. Namely because Pyrex doesn't think of
 
40
    # this PyObject* to be the same type as a PyObject* defined in another
 
41
    # pyrex file... However, because we don't INCREF, we don't want to define
 
42
    # it as returning a regular 'object'.
 
43
    PyObject * StaticTuple_GET_ITEM(StaticTuple key, Py_ssize_t offset)
40
44
    int StaticTuple_CheckExact(object)