]> granicus.if.org Git - python/commit
Issue #6688: Optimize PyBytes_FromObject().
authorAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 9 Jan 2010 22:14:46 +0000 (22:14 +0000)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 9 Jan 2010 22:14:46 +0000 (22:14 +0000)
commita5c565a53493eefd9f0e531003bc2396e3cb726a
tree407e0072c1d10ac1003a4651a51095610ae887ed
parent0c0e229dd0a12eed81e08917339f2f11e12be96c
Issue #6688: Optimize PyBytes_FromObject().

  - Add special-cases for list and tuple objects.
  - Use _PyObject_LengthHint() instead of an arbitrary value for the
    size of the initial buffer of the returned object.
Objects/bytesobject.c