1. 09 Aug, 2002 37 commits
  2. 08 Aug, 2002 3 commits
    • Guido van Rossum's avatar
      Significant speedup in new-style object creation: in slot_tp_new(), · 3ed6e278
      Guido van Rossum authored
      intern the string "__new__" so we can call PyObject_GetAttr() rather
      than PyObject_GetAttrString().  (Though it's a mystery why slot_tp_new
      is being called when a class doesn't define __new__.  I'll look into
      that tomorrow.)
      
      2.2 backport candidate (but I won't do it).
      3ed6e278
    • Jack Jansen's avatar
      Use hex escape for non-ascii chars, now that the parser wants that. · d1bef76e
      Jack Jansen authored
      Good thing, too: some of the characters had been mangled by OS9->CVS->OSX
      roundtrips.
      d1bef76e
    • Guido van Rossum's avatar
      A modest speedup of object deallocation. call_finalizer() did rather · f3f567e5
      Guido van Rossum authored
      a lot of work: it had to save and restore the current exception around
      a call to lookup_maybe(), because that could fail in rare cases, and
      most objects don't have a __del__ method, so the whole exercise was
      usually a waste of time.  Changed this to cache the __del__ method in
      the type object just like all other special methods, in a new slot
      tp_del.  So now subtype_dealloc() can test whether tp_del is NULL and
      skip the whole exercise if it is.  The new slot doesn't need a new
      flag bit: subtype_dealloc() is only called if the type was dynamically
      allocated by type_new(), so it's guaranteed to have all current slots.
      Types defined in C cannot fill in tp_del with a function of their own,
      so there's no corresponding "wrapper".  (That functionality is already
      available through tp_dealloc.)
      f3f567e5