~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-01 20:57:55 UTC
  • mto: (4679.6.1 2.1-export-c-api)
  • mto: This revision was merged to the branch mainline in revision 4735.
  • Revision ID: john@arbash-meinel.com-20091001205755-6gvs1f6njipjbxo6
messy but working.

Start exposing the C API using a nice python dict, rather than offsets into an array.
This is much more convenient and allows a small amount of api skew without
serious problems. It also allows some safety checks to be performed during
import.


Mostly we just need to clean up the code a bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        # cdef unsigned char _unused1
33
33
        cdef PyObject *items[0]
34
34
 
35
 
    void **StaticTuple_API
36
 
    int import_static_tuple()
 
35
    int import_static_tuple_c() except -1
37
36
    # ctypedef object (*st_new_type)(Py_ssize_t)
38
37
    # st_new_type st_new
39
38
    int STATIC_TUPLE_ALL_STRING