1. 13 Ock, 2003 1 kayıt (commit)
  2. 29 Tem, 2002 1 kayıt (commit)
  3. 09 Tem, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: added · 7c321a80
      Tim Peters yazdı
      more trivial lexical helper macros so that uses of these guys expand
      to nothing at all when they're not enabled.  This should help sub-
      standard compilers that can't do a good job of optimizing away the
      previous "(void)0" expressions.
      
      Py_DECREF:  There's only one definition of this now.  Yay!  That
      was that last one in the family defined multiple times in an #ifdef
      maze.
      
      Py_FatalError():  Changed the char* signature to const char*.
      
      _Py_NegativeRefcount():  New helper function for the Py_REF_DEBUG
      expansion of Py_DECREF.  Calling an external function cuts down on
      the volume of generated code.  The previous inline expansion of abort()
      didn't work as intended on Windows (the program often kept going, and
      the error msg scrolled off the screen unseen).  _Py_NegativeRefcount
      calls Py_FatalError instead, which captures our best knowledge of
      how to abort effectively across platforms.
      7c321a80
  4. 06 Ara, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      SF bug #488514: -Qnew needs work · 3caca232
      Tim Peters yazdı
      Big Hammer to implement -Qnew as PEP 238 says it should work (a global
      option affecting all instances of "/").
      
      pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
      iff -Qnew is passed on the command line.  This should go away (as the
      comments say) when true division becomes The Rule.  This is
      deliberately not exposed to runtime inspection or modification:  it's
      a one-way one-shot switch to pretend you're using Python 3.
      
      ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
      BINARY_TRUE_DIVIDE.
      
      test_{descr, generators, zipfile}.py:  fiddle so these pass under
      -Qnew too.  This was just a matter of s!/!//! in test_generators and
      test_zipfile.  test_descr was trickier, as testbinop() is passed
      assumptions that "/" is the same as calling a "__div__" method; put
      a temporary hack there to call "__truediv__" instead when the method
      name is "__div__" and 1/2 evaluates to 0.5.
      
      Three standard tests still fail under -Qnew (on Windows; somebody
      please try the Linux tests with -Qnew too!  Linux runs a whole bunch
      of tests Windows doesn't):
          test_augassign
          test_class
          test_coercion
      I can't stay awake longer to stare at this (be my guest).  Offhand
      cures weren't obvious, nor was it even obvious that cures are possible
      without major hackery.
      
      Question:  when -Qnew is in effect, should calls to __div__ magically
      change into calls to __truediv__?  See "major hackery" at tail end of
      last paragraph <wink>.
      3caca232
  5. 31 Agu, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Add warning mode for classic division, almost exactly as specified in · 393661d1
      Guido van Rossum yazdı
      PEP 238.  Changes:
      
      - add a new flag variable Py_DivisionWarningFlag, declared in
        pydebug.h, defined in object.c, set in main.c, and used in
        {int,long,float,complex}object.c.  When this flag is set, the
        classic division operator issues a DeprecationWarning message.
      
      - add a new API PyRun_SimpleStringFlags() to match
        PyRun_SimpleString().  The main() function calls this so that
        commands run with -c can also benefit from -Dnew.
      
      - While I was at it, I changed the usage message in main() somewhat:
        alphabetized the options, split it in *four* parts to fit in under
        512 bytes (not that I still believe this is necessary -- doc strings
        elsewhere are much longer), and perhaps most visibly, don't display
        the full list of options on each command line error.  Instead, the
        full list is only displayed when -h is used, and otherwise a brief
        reminder of -h is displayed.  When -h is used, write to stdout so
        that you can do `python -h | more'.
      
      Notes:
      
      - I don't want to use the -W option to control whether the classic
        division warning is issued or not, because the machinery to decide
        whether to display the warning or not is very expensive (it involves
        calling into the warnings.py module).  You can use -Werror to turn
        the warnings into exceptions though.
      
      - The -Dnew option doesn't select future division for all of the
        program -- only for the __main__ module.  I don't know if I'll ever
        change this -- it would require changes to the .pyc file magic
        number to do it right, and a more global notion of compiler flags.
      
      - You can usefully combine -Dwarn and -Dnew: this gives the __main__
        module new division, and warns about classic division everywhere
        else.
      393661d1
  6. 23 Tem, 2001 2 kayıt (commit)
  7. 01 Eyl, 2000 1 kayıt (commit)
  8. 08 Tem, 2000 1 kayıt (commit)
  9. 30 Haz, 2000 2 kayıt (commit)
  10. 01 May, 2000 1 kayıt (commit)
  11. 04 Ara, 1998 1 kayıt (commit)
  12. 10 Nis, 1998 1 kayıt (commit)
  13. 06 Şub, 1998 1 kayıt (commit)
  14. 29 Agu, 1997 2 kayıt (commit)
  15. 19 Tem, 1997 1 kayıt (commit)
  16. 03 Mar, 1997 1 kayıt (commit)
  17. 14 Şub, 1997 1 kayıt (commit)
  18. 25 Eki, 1996 1 kayıt (commit)
  19. 22 May, 1996 1 kayıt (commit)
  20. 17 Ock, 1995 1 kayıt (commit)
  21. 12 Ock, 1995 1 kayıt (commit)
  22. 09 Ock, 1995 1 kayıt (commit)
  23. 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
  24. 30 Ara, 1994 1 kayıt (commit)
  25. 01 Agu, 1994 1 kayıt (commit)
  26. 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
  27. 29 Mar, 1993 1 kayıt (commit)
    • Guido van Rossum's avatar
      * Changed all copyright messages to include 1993. · 9bfef44d
      Guido van Rossum yazdı
      * Stubs for faster implementation of local variables (not yet finished)
      * Added function name to code object.  Print it for code and function
        objects.  THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
        number has changed accordingly)
      * Print address of self for built-in methods
      * New internal functions getattro and setattro (getattr/setattr with
        string object arg)
      * Replaced "dictobject" with more powerful "mappingobject"
      * New per-type functio tp_hash to implement arbitrary object hashing,
        and hashobject() to interface to it
      * Added built-in functions hash(v) and hasattr(v, 'name')
      * classobject: made some functions static that accidentally weren't;
        added __hash__ special instance method to implement hash()
      * Added proper comparison for built-in methods and functions
      9bfef44d
  28. 05 Nis, 1992 1 kayıt (commit)
  29. 16 Agu, 1991 1 kayıt (commit)
  30. 19 Şub, 1991 1 kayıt (commit)
  31. 20 Ara, 1990 1 kayıt (commit)