/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/_static_tuple_c.c

  • Committer: John Arbash Meinel
  • Date: 2009-10-20 22:13:23 UTC
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091020221323-vvukgazqxkicb70n
A bit broken, but getting there.

Start being much stricter about requiring StaticTuples everywhere.
I may go back and loosen this restriction, but getting the code base
StaticTuple pure is probably a good idea. The main reason to be 'looser'
is so that things don't fail 'in the wild' just because someone
calls an api with a tuple rather than a StaticTuple.
However, I'd like the internals to be 'pure' if possible.
We'll see.

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
        obj = PyTuple_GET_ITEM(args, i);
251
251
        if (!PyString_CheckExact(obj)) {
252
252
            if (!StaticTuple_CheckExact(obj)) {
253
 
                PyErr_SetString(PyExc_TypeError, "StaticTuple.__init__(...)"
254
 
                    " requires that all items are strings or StaticTuple.");
 
253
                PyErr_Format(PyExc_TypeError, "StaticTuple.__init__(...)"
 
254
                    " requires that all items are strings or StaticTuple"
 
255
                    " not %s", Py_TYPE(obj)->tp_name);
255
256
                type->tp_dealloc((PyObject *)self);
256
257
                return NULL;
257
258
            }