~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_static_tuple_c.h

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-10-13 06:08:53 UTC
  • mfrom: (4737.1.1 merge-2.0-into-devel)
  • Revision ID: pqm@pqm.ubuntu.com-20091013060853-erk2aaj80fnkrv25
(andrew) Merge lp:bzr/2.0 into lp:bzr, including fixes for #322807,
        #389413, #402623 and documentation improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2009, 2010 Canonical Ltd
 
1
/* Copyright (C) 2009 Canonical Ltd
2
2
 * 
3
3
 * This program is free software; you can redistribute it and/or modify
4
4
 * it under the terms of the GNU General Public License as published by
67
67
#define StaticTuple_SET_ITEM(key, offset, val) \
68
68
    ((((StaticTuple*)(key))->items[(offset)]) = ((PyObject *)(val)))
69
69
#define StaticTuple_GET_ITEM(key, offset) (((StaticTuple*)key)->items[offset])
70
 
#define StaticTuple_GET_SIZE(key) (((StaticTuple*)key)->size)
71
70
 
72
71
 
73
72
#ifdef STATIC_TUPLE_MODULE
75
74
 
76
75
static StaticTuple * StaticTuple_New(Py_ssize_t);
77
76
static StaticTuple * StaticTuple_Intern(StaticTuple *self);
78
 
static StaticTuple * StaticTuple_FromSequence(PyObject *);
79
77
#define StaticTuple_CheckExact(op) (Py_TYPE(op) == &StaticTuple_Type)
80
78
 
81
79
#else
85
83
 
86
84
static StaticTuple *(*StaticTuple_New)(Py_ssize_t);
87
85
static StaticTuple *(*StaticTuple_Intern)(StaticTuple *);
88
 
static StaticTuple *(*StaticTuple_FromSequence)(PyObject *);
89
86
static PyTypeObject *_p_StaticTuple_Type;
90
87
 
91
88
#define StaticTuple_CheckExact(op) (Py_TYPE(op) == _p_StaticTuple_Type)
101
98
            "StaticTuple *(Py_ssize_t)"},
102
99
        {"StaticTuple_Intern", (void **)&StaticTuple_Intern,
103
100
            "StaticTuple *(StaticTuple *)"},
104
 
        {"StaticTuple_FromSequence", (void **)&StaticTuple_FromSequence,
105
 
            "StaticTuple *(PyObject *)"},
106
101
        {"_StaticTuple_CheckExact", (void **)&_StaticTuple_CheckExact,
107
102
            "int(PyObject *)"},
108
103
        {NULL}};