1. 28 Eki, 2004 1 kayıt (commit)
    • Armin Rigo's avatar
      Wrote down the invariants of some common objects whose structure is · 89a39461
      Armin Rigo yazdı
      exposed in header files.  Fixed a few comments in these headers.
      
      As we might have expected, writing down invariants systematically exposed a
      (minor) bug.  In this case, function objects have a writeable func_code
      attribute, which could be set to code objects with the wrong number of
      free variables.  Calling the resulting function segfaulted the interpreter.
      Added a corresponding test.
      89a39461
  2. 01 Tem, 2003 1 kayıt (commit)
  3. 15 Eyl, 2002 1 kayıt (commit)
  4. 19 Agu, 2002 1 kayıt (commit)
    • Guido van Rossum's avatar
      SF patch 576101, by Oren Tirosh: alternative implementation of · 45ec02ae
      Guido van Rossum yazdı
      interning.  I modified Oren's patch significantly, but the basic idea
      and most of the implementation is unchanged.  Interned strings created
      with PyString_InternInPlace() are now mortal, and you must keep a
      reference to the resulting string around; use the new function
      PyString_InternImmortal() to create immortal interned strings.
      45ec02ae
  5. 14 Agu, 2002 1 kayıt (commit)
  6. 12 Agu, 2002 1 kayıt (commit)
  7. 24 May, 2002 1 kayıt (commit)
  8. 29 Mar, 2002 1 kayıt (commit)
  9. 23 Eki, 2001 1 kayıt (commit)
  10. 11 Eyl, 2001 1 kayıt (commit)
  11. 30 Agu, 2001 1 kayıt (commit)
  12. 24 Agu, 2001 1 kayıt (commit)
    • Barry Warsaw's avatar
      PyString_FromFormat() and PyString_FromFormatV(): Largely ripped from · dadace00
      Barry Warsaw yazdı
          PyErr_Format() these new C API methods can be used instead of
          sprintf()'s into hardcoded char* buffers.  This allows us to fix
          many situation where long package, module, or class names get
          truncated in reprs.
      
          PyString_FromFormat() is the varargs variety.
          PyString_FromFormatV() is the va_list variety
      
          Original PyErr_Format() code was modified to allow %p and %ld
          expansions.
      
          Many reprs were converted to this, checkins coming soo.  Not
          changed: complex_repr(), float_repr(), float_print(), float_str(),
          int_repr().  There may be other candidates not yet converted.
      
          Closes patch #454743.
      dadace00
  13. 16 Haz, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      SF bug 433228: repr(list) woes when len(list) big. · a7259597
      Tim Peters yazdı
      Gave Python linear-time repr() implementations for dicts, lists, strings.
      This means, e.g., that repr(range(50000)) is no longer 50x slower than
      pprint.pprint() in 2.2 <wink>.
      
      I don't consider this a bugfix candidate, as it's a performance boost.
      
      Added _PyString_Join() to the internal string API.  If we want that in the
      public API, fine, but then it requires runtime error checks instead of
      asserts.
      a7259597
  14. 24 May, 2001 1 kayıt (commit)
  15. 15 May, 2001 1 kayıt (commit)
    • Marc-André Lemburg's avatar
      This patch changes the way the string .encode() method works slightly · 2d920419
      Marc-André Lemburg yazdı
      and introduces a new method .decode().
      
      The major change is that strg.encode() will no longer try to convert
      Unicode returns from the codec into a string, but instead pass along
      the Unicode object as-is. The same is now true for all other codec
      return types. The underlying C APIs were changed accordingly.
      
      Note that even though this does have the potential of breaking
      existing code, the chances are low since conversion from Unicode
      previously took place using the default encoding which is normally
      set to ASCII rendering this auto-conversion mechanism useless for
      most Unicode encodings.
      
      The good news is that you can now use .encode() and .decode() with
      much greater ease and that the door was opened for better accessibility
      of the builtin codecs.
      
      As demonstration of the new feature, the patch includes a few new
      codecs which allow string to string encoding and decoding (rot13,
      hex, zip, uu, base64).
      
      Written by Marc-Andre Lemburg. Copyright assigned to the PSF.
      2d920419
  16. 23 Şub, 2001 1 kayıt (commit)
  17. 21 Eyl, 2000 1 kayıt (commit)
    • Tim Peters's avatar
      Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats. · 38fd5b64
      Tim Peters yazdı
      Note a curious extension to the std C rules:  x, X and o formatting can never produce
      a sign character in C, so the '+' and ' ' flags are meaningless for them.  But
      unbounded ints *can* produce a sign character under these conversions (no fixed-
      width bitstring is wide enough to hold all negative values in 2's-comp form).  So
      these flags become meaningful in Python when formatting a Python long which is too
      big to fit in a C long.  This required shuffling around existing code, which hacked
      x and X conversions to death when both the '#' and '0' flags were specified:  the
      hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
      '+' flags too, since signs were always meaningless before for x and X conversions.
      Isomorphic shuffling was required in unicodeobject.c.
      Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
      38fd5b64
  18. 19 Eyl, 2000 1 kayıt (commit)
    • Marc-André Lemburg's avatar
      This patch adds a new Python C API called PyString_AsStringAndSize() · d1ba4432
      Marc-André Lemburg yazdı
      which implements the automatic conversion from Unicode to a string
      object using the default encoding.
      
      The new API is then put to use to have eval() and exec accept
      Unicode objects as code parameter. This closes bugs #110924
      and #113890.
      
      As side-effect, the traditional C APIs PyString_Size() and
      PyString_AsString() will also accept Unicode objects as
      parameters.
      d1ba4432
  19. 01 Eyl, 2000 1 kayıt (commit)
  20. 09 Tem, 2000 1 kayıt (commit)
  21. 06 Tem, 2000 1 kayıt (commit)
  22. 30 Haz, 2000 2 kayıt (commit)
  23. 04 Ara, 1998 1 kayıt (commit)
  24. 18 Ock, 1997 1 kayıt (commit)
    • Guido van Rossum's avatar
      Two speedup hacks. Caching the hash saves recalculation of a string's · 1e6e9a23
      Guido van Rossum yazdı
      hash value.  Interning strings (which requires hash caching) tries to
      ensure that only one string object with a given value exists, so
      equality tests are one pointer comparison.  Together, these can speed
      the interpreter up by as much as 20%.  Each costs the size of a long
      or pointer per string object.  In addition, interned strings live
      until the end of times.  If you are concerned about memory footprint,
      simply comment the #define out here (and rebuild everything!).
      1e6e9a23
  25. 06 Ock, 1997 1 kayıt (commit)
  26. 10 Ara, 1996 1 kayıt (commit)
  27. 25 Eki, 1996 1 kayıt (commit)
  28. 30 Tem, 1996 1 kayıt (commit)
  29. 27 Şub, 1995 1 kayıt (commit)
  30. 17 Ock, 1995 1 kayıt (commit)
  31. 12 Ock, 1995 1 kayıt (commit)
  32. 04 Ock, 1995 1 kayıt (commit)
    • Guido van Rossum's avatar
      Added 1995 copyright. · 5799b520
      Guido van Rossum yazdı
      object.h: made sizes and refcnts signed ints.
      stringobject.h: make getstrsize() signed int.
      methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
      5799b520
  33. 18 Agu, 1994 1 kayıt (commit)
  34. 01 Agu, 1994 1 kayıt (commit)
  35. 22 Eki, 1993 1 kayıt (commit)
  36. 28 Tem, 1993 1 kayıt (commit)
    • Guido van Rossum's avatar
      * Added support for X11 modules. · a3309960
      Guido van Rossum yazdı
      * Makefile: change location of FORMS library.
      * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not)
      * Almost all .h files: added CPP magic to avoid duplicate inclusions and
        to support inclusion from C++.
      a3309960
  37. 16 Mar, 1993 1 kayıt (commit)
    • Guido van Rossum's avatar
      * Changed many files to use mkvalue() instead of newtupleobject(). · e537240c
      Guido van Rossum yazdı
      * Fixcprt.py: added [-y file] option, do only files younger than file.
      * modsupport.[ch]: added vmkvalue().
      * intobject.c: use mkvalue().
      * stringobject.c: added "formatstring"; renamed string* to string_*;
        ceval.c: call formatstring for string % value.
      * longobject.c: close memory leak in divmod.
      * parsetok.c: set result node to NULL when returning an error.
      e537240c
  38. 05 Nis, 1992 1 kayıt (commit)
  39. 19 Şub, 1991 1 kayıt (commit)