~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4371.3.28.

  • Committer: John Arbash Meinel
  • Date: 2009-06-11 19:24:57 UTC
  • mto: (4371.4.5 vila-better-heads)
  • mto: This revision was merged to the branch mainline in revision 4449.
  • Revision ID: john@arbash-meinel.com-20090611192457-709bcvurmy02itd3
Finish converting away from 'cdef list' syntax.

Also, I found that casting a PyObject * directly to _KnownGraphNode avoids
the TypeTest. Since PyDict_GetItem and PyList_GET_ITEM return borrowed
references anyway, we need a cast (to auto-incref the pointer), so
we may as well use them for speed, and avoid the type check at the same
time.
Also using PyDict_Next everywhere instead of 'for x in dict.iterX'.
The nice thing about PyDict_Next is that it always gives you items, but you
can chose what you actually care about.


Also, by doing all these manipulations directly, we shave some more time out
of building a KnownGraph and out of the heads() calls.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: