Commit Graph

1842 Commits

Author SHA1 Message Date
Raymond Hettinger 21012b8235 Micro-optimizations.
* List/Tuple checkexact is faster for the common case.
* Testing for Py_True and Py_False can be inlined for faster looping.
2003-02-26 18:11:50 +00:00
Just van Rossum 5bfba3aeb9 Addendum to #683658:
import warnings.py _after_ site.py has run. This ensures that site.py
is again the first .py to be imported, giving it back full control over
sys.path.
2003-02-25 20:25:12 +00:00
Walter Dörwald b671c0c418 Remove unused variables. 2003-02-24 15:33:31 +00:00
Neal Norwitz 3e59076b1d Fix SF bug #690435, apply fails to check if warning raises exception
(patch provided by Greg Chapman)
2003-02-23 21:45:43 +00:00
Michael W. Hudson c85b6a2d4d After the removal of SET_LINENO, PyCode_Addr2Line has always been
called to find tb_lineno -- even if Py_OptimizeFlag is true.

So don't call it again when printing the traceback.
2003-02-22 13:07:53 +00:00
Guido van Rossum 6297a7a9fb - PyEval_GetFrame() is now declared to return a PyFrameObject *
instead of a plain PyObject *.  (SF patch #686601 by Ben Laurie.)
2003-02-19 15:53:17 +00:00
Guido van Rossum 162e38c6a3 - sys.path[0] (the directory from which the script is loaded) is now
turned into an absolute pathname, unless it is the empty string.
  (SF patch #664376, by Skip Montanaro.)
2003-02-19 15:25:10 +00:00
Mark Hammond a43fd0c899 Fix bug 683658 - PyErr_Warn may cause import deadlock. 2003-02-19 00:33:33 +00:00
Neal Norwitz 08ea61ad45 Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead
2003-02-17 18:18:00 +00:00
Marc-André Lemburg 9cac1c4574 Patch for bug reported in patch #686627: import race condition in
codecs registry startup.
2003-02-14 20:25:56 +00:00
Guido van Rossum 4b499dd3fb - Finally fixed the bug in compile() and exec where a string ending
with an indented code block but no newline would raise SyntaxError.
  This would have been a four-line change in parsetok.c...  Except
  codeop.py depends on this behavior, so a compilation flag had to be
  invented that causes the tokenizer to revert to the old behavior;
  this required extra changes to 2 .h files, 2 .c files, and 2 .py
  files.  (Fixes SF bug #501622.)
2003-02-13 22:07:59 +00:00
Neal Norwitz 2294c0d4ec Cleanup from patch #683257:
Add missing INCREFs and re-indent returns to be consistent.
 Add \n\ for lines in docstring
 Add a pathetic test
 Add docs
2003-02-12 23:02:21 +00:00
Guido van Rossum c4f4ca91e1 Provide access to the import lock, fixing SF bug #580952. This is
mostly from SF patch #683257, but I had to change unlock_import() to
return an error value to avoid fatal error.

Should this be backported?  The patch requested this, but it's a new
feature.
2003-02-12 21:46:11 +00:00
Guido van Rossum 66b1259dbc SF #660455 : patch by NNorwitz.
"Unsigned" (i.e., positive-looking, but really negative) hex/oct
constants with a leading minus sign are once again properly negated.
The micro-optimization for negated numeric constants did the wrong
thing for such hex/oct constants.  The patch avoids the optimization
for all hex/oct constants.

This needs to be backported to Python 2.2!
2003-02-12 16:57:47 +00:00
Walter Dörwald 8dd19321bb Change filtertuple() to use tp_as_sequence->sq_item
instead of PyTuple_GetItem, so an overwritten __getitem__
in a tuple subclass works. SF bug #665835.
2003-02-10 17:36:40 +00:00
Tim Peters 2c646c9fc1 Squashed compiler wng about signed/unsigned clash in comparison. 2003-02-10 14:48:29 +00:00
Walter Dörwald 1918f7755e Change filterstring() and filterunicode(): If the
object is not a real str or unicode but an instance
of a subclass, construct the output via looping
over __getitem__. This guarantees that the result
is the same for function==None and function==lambda x:x

This doesn't happen for tuples, because filtertuple()
uses PyTuple_GetItem().

(This was discussed on SF bug #665835).
2003-02-10 13:19:13 +00:00
Just van Rossum b9b8e9cf6d My previous checkin caused compile() to no longer accept buffers, as noted
my MAL. Fixed. (Btw. eval() still doesn't take buffers, but that was so
even before my patch.)
2003-02-10 09:22:01 +00:00
Just van Rossum 3aaf42c613 patch #683515: "Add unicode support to compile(), eval() and exec"
Incorporated nnorwitz's comment re. Py__USING_UNICODE.
2003-02-10 08:21:10 +00:00
Jeremy Hylton 985eba53f5 Small function call optimization and special build option for call stats.
-DCALL_PROFILE: Count the number of function calls executed.

When this symbol is defined, the ceval mainloop and helper functions
count the number of function calls made.  It keeps detailed statistics
about what kind of object was called and whether the call hit any of
the special fast paths in the code.

Optimization:

When we take the fast_function() path, which seems to be taken for
most function calls, and there is minimal frame setup to do, avoid
call PyEval_EvalCodeEx().  The eval code ex function does a lot of
work to handle keywords args and star args, free variables,
generators, etc.  The inlined version simply allocates the frame and
copies the arguments values into the frame.

The optimization gets a little help from compile.c which adds a
CO_NOFREE flag to code objects that don't have free variables or cell
variables.  This change allows fast_function() to get into the fast
path with fewer tests.

I measure a couple of percent speedup in pystone with this change, but
there's surely more that can be done.
2003-02-05 23:13:00 +00:00
Neil Schemenauer 5042da6b1e If a float is passed where a int is expected, issue a DeprecationWarning
instead of raising a TypeError.  Closes #660144 (again).
2003-02-04 20:59:40 +00:00
Walter Dörwald c3da83fcd7 Make sure filter() never returns tuple, str or unicode
subclasses. (Discussed in SF patch #665835)
2003-02-04 20:24:45 +00:00
Walter Dörwald 531e000d2e PyUnicode_Resize() doesn't free its argument in case of a failure,
so we can jump to the error handling code that does.
(Spotted by Neal Norwitz)
2003-02-04 16:57:49 +00:00
Walter Dörwald 903f1e0c40 filterstring() and filterunicode() in Python/bltinmodule.c
blindly assumed that tp_as_sequence->sq_item always returns
a str or unicode object. This might fail with str or unicode
subclasses.

This patch checks whether the object returned from __getitem__
is a str/unicode object and raises a TypeError if not (and
the filter function returned true).

Furthermore the result for __getitem__ can be more than one
character long, so checks for enough memory have to be done.
2003-02-04 16:28:00 +00:00
Neal Norwitz 94c30c0124 SF #661437, apply() should get PendingDeprecation 2003-02-03 20:23:33 +00:00
Jeremy Hylton 4f0dcc9a9a Provide __module__ attributes for functions defined in C and Python.
__module__ is the string name of the module the function was defined
in, just like __module__ of classes.  In some cases, particularly for
C functions, the __module__ may be None.

Change PyCFunction_New() from a function to a macro, but keep an
unused copy of the function around so that we don't change the binary
API.

Change pickle's save_global() to use whichmodule() if __module__ is
None, but add the __module__ logic to whichmodule() since it might be
used outside of pickle.
2003-01-31 18:33:18 +00:00
Fred Drake ceead6d957 Style consistency, so "grep ^function ..." works as expected. 2003-01-30 15:08:25 +00:00
Martin v. Löwis 8afd7571a1 Patch #636005: Filter unicode into unicode. 2003-01-25 22:46:11 +00:00
Neil Schemenauer b808e99d34 Raise a TypeError if a float is passed when an integer is specified.
Calling PyInt_AsLong() on a float truncates it which is almost never
the desired behavior.  This closes SF bug #660144.
2003-01-24 22:15:21 +00:00
Jack Jansen a038270590 MacPython-OS9 has had an abort() function for quite a while now, so there's no reason to stall in an endless loop, just call abort() on a fatal error. 2003-01-24 16:17:18 +00:00
Jack Jansen 9363dca3f8 MacPython-OS9 specific fix: If there are non-string items on sys.path don't try to intern them. This has the theoretical problem that resource filenames on sys.path cannot be unicode objects, but in practice that shouldn't matter. 2003-01-24 16:15:45 +00:00
Martin v. Löwis d7ceb222bd Patch #671459: Invoke import hooks in Py_NewInterpreter. 2003-01-22 09:00:38 +00:00
Martin v. Löwis dfc33fd8db Don't use Posix semaphores on Solaris 8. Fixes #662787. 2003-01-21 10:14:41 +00:00
Raymond Hettinger 4bad9ba282 SF patch #670367: Micro-optimizations for ceval.c
Make the code slightly shorter, faster, and easier to
read.

* Eliminate unused DUP_TOPX code for x==1.
compile.c always generates DUP_TOP instead.

* Since only two cases remain for DUP_TOPX, replace
the switch-case with if-elseif.

* The in-lined integer compare does a CheckExact on
both arguments. Since the second is a little more
likely to fail, test it first.

* The switch-case for IS/IS_NOT and IN/NOT_IN can
separate the regular and inverted cases with no
additional work. For all four paths, saves a test and
jump.
2003-01-19 05:08:13 +00:00
Jack Jansen b2a57722a8 It turns out that some calls return AEDesc records that are "borrowed",
the AEDesc data shouldn't be disposed when the Python object is.

Added a C call AEDesc_NewBorrowed() to create these objects and a Python
method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
2003-01-17 23:11:17 +00:00
Michael W. Hudson 976249be74 A. Lloyd Flanagan pointed out a spelling error on c.l.py. 2003-01-16 15:39:07 +00:00
Raymond Hettinger 8bb90a59a6 Replaced POP() with STACKADJ(-1) on lines where the result wasn't used.
The two are semantically equivalent, but the first triggered a compiler
warning about an unused variable.  Note, the preceding steps had already
accessed and decreffed the variable so the reference counts were fine.
2003-01-14 12:43:10 +00:00
Raymond Hettinger 71731d7f70 As discussed on python-dev, removed from DUP_TOPX support for the
parameter being either four or five.  Currently, compile.c does not
generate calls with a parameter higher than three.

May have to be reverted if the second alpha or beta shakes out some
other tool generating this op code with a parameter of four or five.
2003-01-10 16:45:17 +00:00
Neal Norwitz 37aa066164 As discussed briefly on python-dev, add Pending Deprecation Warning
when a string exception is raised.  Note that raising string exceptions
is deprecated in an exception message.
2003-01-10 15:31:15 +00:00
Raymond Hettinger 663004bb3d SF patch #664320: Replace push/pop clusters in ceval.c
Replaced groups of pushes and pops with indexed access to the stack and
a single adjustment (if needed) to the stacklevel.

Avoids scores of unnecessary increments and decrements to the stackpointer.
Removes unnecessary sequential dependencies so that the compiler has more
freedom for optimizations.  Frees the processor for more parallel and
pipelined execution by using mostly read-only access and having few pointer
adjustments just prior to a read or write.
2003-01-09 15:24:30 +00:00
Thomas Heller 27bb71e963 Patch #664376: sys.path[0] should contain absolute pathname.
This fixes the problem on Windows - that's the only system where I can
test it.

It leaves sys.argv alone and only changes sys.path[0] to an absolute
pathname.
2003-01-08 14:33:48 +00:00
Raymond Hettinger 69bf8f3f4e SF bug #655271: Slightly modify locals() doc
Clarify the operation of locals().
2003-01-04 02:16:22 +00:00
Guido van Rossum 908ec365dc Another copyright update. (JvR: can you backport this to the 2.3a1
release branch?)
2003-01-02 16:27:15 +00:00
Jeremy Hylton accb62b28e SF patch [ 597919 ] compiler package and SET_LINENO
A variety of changes from Michael Hudson to get the compiler working
with 2.3.  The primary change is the handling of SET_LINENO:

# The set_lineno() function and the explicit emit() calls for
# SET_LINENO below are only used to generate the line number table.
# As of Python 2.3, the interpreter does not have a SET_LINENO
# instruction.  pyassem treats SET_LINENO opcodes as a special case.

A few other small changes:
 - Remove unused code from pycodegen and pyassem.
 - Fix error handling in parsermodule.  When PyParser_SimplerParseString()
   fails, it sets an exception with detailed info.  The parsermodule
   was clobbering that exception and replacing it was a generic
   "could not parse string" exception.  Keep the original exception.
2002-12-31 18:17:44 +00:00
Neal Norwitz b2501f4cd1 Since the *_Init() are private, prefix with _, suggested by Skip 2002-12-31 03:42:13 +00:00
Neal Norwitz 7b8e35ed7d Fix SF #639945, 64-bit bug on AIX
I can't test this on the snake farm (no aix box is working).
This change works for the submitter seems correct.
Can anybody test this on 32- and 64- bit AIX?
2002-12-31 00:06:24 +00:00
Neal Norwitz c91ed400e0 SF #561244, Micro optimizations
Initialize the small integers and __builtins__ in startup.
This removes some if conditions.
Change XDECREF to DECREF for values which shouldn't be NULL.
2002-12-30 22:29:22 +00:00
Just van Rossum 52e14d640b PEP 302 + zipimport:
- new import hooks in import.c, exposed in the sys module
- new module called 'zipimport'
- various changes to allow bootstrapping from zip files

I hope I didn't break the Windows build (or anything else for that
matter), but then again, it's been sitting on sf long enough...

Regarding the latest discussions on python-dev: zipimport sets
pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as
/path/to/Archive.zip/subdir/ are supported again.
2002-12-30 22:08:05 +00:00
Raymond Hettinger bbfb910416 Make error message more specific for min() and max().
Suggested by MvL.
2002-12-29 18:31:19 +00:00
Raymond Hettinger ea3fdf44a2 SF patch #659536: Use PyArg_UnpackTuple where possible.
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
2002-12-29 16:33:45 +00:00
Just van Rossum 8982595870 Backing out patch #642578 in anticipation of final acceptance of PEP 302. 2002-12-25 23:13:34 +00:00
Jack Jansen 0a116f3a29 Squashed compiler warnings by adding casts, making sure prototypes are in
scope and looking at types.
2002-12-23 21:03:36 +00:00
Guido van Rossum 633d90c7a3 Oops. Roll back that last change. It wasn't ready for release. :-( 2002-12-23 16:51:42 +00:00
Guido van Rossum 9c8a0866c9 Add warning for assignment to None, True and False. This is patch
549213 by Jeremy (checking in for him since he's away and busy).
2002-12-23 16:35:23 +00:00
Neal Norwitz 06982221bb SF # 654960, remove unnecessary static variable
The static variable (implicit) was not necessary.
The c_globals can be None or True now.
2002-12-18 01:18:44 +00:00
Gustavo Niemeyer 78429a6aa6 Fixing bug
[#448679] Left to right

* Python/compile.c
  (com_dictmaker): Reordered evaluation of dictionaries to follow strict
  LTR evaluation.

* Lib/compiler/pycodegen.py
  (CodeGenerator.visitDict): Reordered evaluation of dictionaries to
  follow strict LTR evaluation.

* Doc/ref/ref5.tex
  Documented the general LTR evaluation order idea.

* Misc/NEWS
  Documented change in evaluation order of dictionaries.
2002-12-16 13:54:02 +00:00
Jack Jansen c389ec8d55 Got rid of old (non-carbon-ppc and even cfm68k) file extensions for
extension modules.
2002-12-16 13:16:25 +00:00
Just van Rossum bbfd859521 Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF 2002-12-15 13:45:32 +00:00
Jack Jansen 72f3b7a5de Added missing casts. 2002-12-13 15:23:10 +00:00
Walter Dörwald d9a6ad3beb Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.

This closes SF patch #649608.
2002-12-12 16:41:44 +00:00
Martin v. Löwis 95292d6caa Constify filenames and scripts. Fixes #651362. 2002-12-11 14:04:59 +00:00
Martin v. Löwis b023381466 Patch #650415: Avoid redefinition of macros. 2002-12-11 13:12:30 +00:00
Martin v. Löwis 79acb9edfa Patch #614055: Support OpenVMS. 2002-12-06 12:48:53 +00:00
Andrew MacIntyre c4c127b850 reformat for PEP-7 style conformance 2002-12-04 12:29:37 +00:00
Andrew MacIntyre 6904959921 typo fix: declaration required for VACPP not EMX+gcc 2002-12-04 12:27:06 +00:00
Martin v. Löwis 779ffc066e Add compile-time errors for unsupported systems. 2002-12-02 22:17:01 +00:00
Just van Rossum 3eb166b49b Slightly improved version of patch #642578: "Expose PyImport_FrozenModules
in imp". This adds two functions to the imp module: get_frozenmodules()
and set_frozenmodules().
2002-11-29 20:47:40 +00:00
Martin v. Löwis 52ea7e9244 Patch #632973: Implement _getdefaultlocale for OS X. 2002-11-26 09:05:36 +00:00
Martin v. Löwis ba2cf078d2 Properly compute array size even for --disable-unicode. 2002-11-21 23:53:25 +00:00
Walter Dörwald dffda2eaf9 Wrap uargs declaration in a #ifdef Py_USING_UNICODE, so that
the --disable-unicode build doesn't complain about an
unused variable.
2002-11-21 20:23:11 +00:00
Walter Dörwald 4c6c76559d Move three variables that are only used inside an if block into the block,
so the --disable-unicode build doesn't complain about unused variables.
2002-11-21 20:13:40 +00:00
Walter Dörwald bf73db835a Fix PEP 293 related problems with --disable-unicode builds
reported by Michael Hudson in
http://mail.python.org/pipermail/python-dev/2002-November/030299.html
2002-11-21 20:08:33 +00:00
Neil Schemenauer 89350a41b9 Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makes
Py_Init crash".  refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.
2002-11-17 17:52:44 +00:00
Neal Norwitz addfe0c09c Make private functions static so we don't pollute the namespace 2002-11-10 14:33:26 +00:00
Michael W. Hudson 5f26dda25d Restore to ANSI C. 2002-11-09 14:47:18 +00:00
Michael W. Hudson 006c75265f This is Richie Hindle's patch:
[ 631276 ] Exceptions raised by line trace function

It conflicted with the patches from Armin I just checked it, so I had
to so some bits by hand.
2002-11-08 13:08:46 +00:00
Michael W. Hudson 019a78e76d Assorted patches from Armin Rigo:
[ 617309 ] getframe hook (Psyco #1)
[ 617311 ] Tiny profiling info (Psyco #2)
[ 617312 ] debugger-controlled jumps (Psyco #3)

These are forward ports from 2.2.2.
2002-11-08 12:53:11 +00:00
Jack Jansen dde800ec4e Got rid of the python.rsrc resource file. The error message strings and
dialogs are now stored in Mac/Lib, and loaded on demand through macresource.
Not only does this simplify a MacPython based on Apple's Python, but
it also makes Mac error codes come out symbolically when running command
line python (if you have Mac/Lib in your path).

The resource files are copied from Mac/Resources. The old ones will disappear
after the OS9 build procedure has been adjusted.
2002-11-07 23:07:05 +00:00
Michael W. Hudson cbd6fb9006 Handle really big steps in extended slices.
Fixes a test failure on 64 bit platforms (I hope).
2002-11-06 15:17:32 +00:00
Neal Norwitz 40cac739c2 Fix SF # 551504, python -v sometimes fails to find init (HPUX)
Joseph Winston recommends removing DYNAMIC_PATH, since it can
cause some dynamic libraries to not load on HP-UX 11.
2002-11-02 20:58:05 +00:00
Martin v. Löwis 566f6afe9a Patch #512981: Update readline input stream on sys.stdin/out change. 2002-10-26 14:39:10 +00:00
Jack Jansen 8fce2ef84c Made MacOS.Error a class style exception (at last!). 2002-10-19 22:02:21 +00:00
Fred Drake 8ed0204bc9 If we have a filename and __main__.__file__ hasn't already been set,
set it.
Closes SF issue #624729.
2002-10-17 21:24:58 +00:00
Mark Hammond 8696ebcd28 Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
2002-10-08 02:44:31 +00:00
Tim Peters 92e4dd8657 s/_alloca/alloca/g; Windows doesn't need the former, at least not unless
__STDC__ is defined (or something like that ...).
2002-10-05 01:47:34 +00:00
Martin v. Löwis a7a76d3d9e Patch #618347: Work around Solaris 2.6 pthread.h bug. Will backport to 2.2. 2002-10-04 07:21:24 +00:00
Mark Hammond 3d61a06aa2 Fix [ 616716 ] Bug in PyErr_SetExcFromWindows
Ensure that even if FormatMessage fails we (a) don't crash, and (b) provide something useful.

Bugfix candidate.
2002-10-04 00:13:02 +00:00
Mark Hammond da7efaa681 Fix errors to pep277 checkin identified by Neal Norwitz. 2002-10-04 00:09:38 +00:00
Michael W. Hudson ca803a0dd7 One last tweak to the tracing machinery: this actually computes what I intended
all along.  Before instr_lb tended to be too high.

I don't think this actually makes any difference, given what the compiler
produces, but it makes me a bit happier.
2002-10-03 09:53:11 +00:00
Michael W. Hudson 3ae3315f44 Clamp code objects' tp_compare result to [-1, 1].
Bugfix candidate.
2002-10-03 09:50:47 +00:00
Mark Hammond c2e85bd4e2 Patch 594001: PEP 277 - Unicode file name support for Windows NT. 2002-10-03 05:10:39 +00:00
Michael W. Hudson fb4d6ecd07 Fix for the recursion_level bug Armin Rigo reported in sf
patch #617312, both on the trunk and the 22-maint branch.

Also added a test case, and ported the test_trace I wrote for HEAD
to 2.2.2 (with all those horrible extra 'line' events ;-).
2002-10-02 13:13:45 +00:00
Martin v. Löwis eb42b026db Add encoding name in LookupError. Fixes #615013. Will backport to 2.2. 2002-09-26 16:01:24 +00:00
Neal Norwitz 2c96ab2b61 Two more cases of switch(PySequence_Size()) without checking for case -1.
(Same problem as last checkin for SF bug 610610)
Need to clear the error and proceed.

Backport candidate
2002-09-18 22:37:17 +00:00
Guido van Rossum 98b2a42bc4 Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz).
The switch in Exception__str__ didn't clear the error if
PySequence_Size() raised an exception.  Added a case -1 which clears
the error and falls through to the default case.

Definite backport candidate (this dates all the way to Python 2.0).
2002-09-18 04:06:32 +00:00
Michael W. Hudson 02ff6a9952 A slight change to SET_LINENO-less tracing.
This makes things a touch more like 2.2.  Read the comments in
Python/ceval.c for more details.
2002-09-11 15:36:32 +00:00
Skip Montanaro 066a8df3a4 missed this one on the previous multi-file checkin - see
http://python.org/sf/602191
2002-09-03 20:24:31 +00:00
Guido van Rossum 602d45194c Add a custom __str__ method to KeyError that applies repr() to the
missing key.  (Also added a guard to SyntaxError__str__ to prevent
calling PyString_Check(NULL).)
2002-09-03 20:24:09 +00:00
Skip Montanaro 99dba27e9a Bump default check interval to 100 instructions. Computers are much faster
than when this interval was first established.  Checking too frequently just
adds needless overhead because most of the time there is nothing to do and
no other threads ready to run.
2002-09-03 20:19:06 +00:00
Skip Montanaro d581d7792b replace thread state objects' ticker and checkinterval fields with two
globals, _Py_Ticker and _Py_CheckInterval.  This also implements Jeremy's
shortcut in Py_AddPendingCall that zeroes out _Py_Ticker.  This allows the
test in the main loop to only test a single value.

The gory details are at

    http://python.org/sf/602191
2002-09-03 20:10:45 +00:00