Guido van Rossum
71160aaffe
Use #include "mymath.h" instead of declaring fabs() explicitly.
...
This should solve a weird problem on the Mac for Jack.
1997-06-03 18:03:18 +00:00
Guido van Rossum
a8d5131d57
Renamed dict.absorb() (too spungy) to dict.update().
1997-06-02 17:13:37 +00:00
Guido van Rossum
80c2a1674e
American spelling in doc string.
1997-06-02 14:43:07 +00:00
Guido van Rossum
e3f5b9c8d1
Added dict.absorb() and dict.copy().
1997-05-28 19:15:28 +00:00
Guido van Rossum
c8b6df9004
PyObject_Compare can raise an exception now.
1997-05-23 00:06:51 +00:00
Guido van Rossum
5b2121b25f
PyObject_Compare can now return an error. Unfortunately, there are a
...
few places where we don't know how to test for them without losing
speed; don't know yet how to handle that.
1997-05-23 00:01:41 +00:00
Guido van Rossum
27a60b147c
PyFile_WriteString now returns an error indicator instead of calling
...
PyErr_Clear().
1997-05-22 22:25:11 +00:00
Guido van Rossum
e9eec54798
Fix typo in error checking spotted by Just...
1997-05-22 14:02:25 +00:00
Guido van Rossum
a9040ec5d9
Renamed a local variable from 'PyCFunction' (which is also a typedef
...
in methodobject.h) to 'func'. /bin/cc on SunOS 4.x didn't grok this.
1997-05-20 22:09:08 +00:00
Guido van Rossum
037b2205e8
Moved PyObject_{Get,Set}Attr to object.c.
...
Fixed two 'return NULL' that should be 'return -1'.
1997-05-20 18:35:19 +00:00
Guido van Rossum
98ff96adba
Moved PyObject_{Get,Set}Attr here (from dictobject) and add PyObject_HasAttr.
1997-05-20 18:34:44 +00:00
Guido van Rossum
967839473a
Got rid of c_error in favor of errno (and EDOM/ERANGE).
...
Assume that errno usage is thread-safe -- most vendors do this by
making in a macro that refers to a per-thread storage area.
1997-05-20 18:21:34 +00:00
Guido van Rossum
3cca24570e
Got rid of all the last_name_* bogosities. I don't think the
...
complexity saved much any more. A simple benchmark (grail) showed
that there were 3 times as many misses as hits, and the same number of
times again the code was bypassed altogether due to the existence of
setattro/getattro.
1997-05-16 14:23:33 +00:00
Guido van Rossum
d0c87ee6c4
Oops, another forgotten renaming: varobject -> PyVarObject.
1997-05-15 21:31:03 +00:00
Guido van Rossum
e61093c218
Fix reversed test for failure in PySequence_List() and PySequence_Tuple().
...
This broke cPickle.
1997-05-14 18:43:29 +00:00
Guido van Rossum
9637432265
Renamed mappingobject.c to dictobject.c.
1997-05-13 21:05:38 +00:00
Guido van Rossum
a9e7a81137
Renamed from mappingobject.c to dictobject.c.
...
(Sorry Jack, all your projects will have to be changed again. :-( )
1997-05-13 21:02:11 +00:00
Guido van Rossum
93ad0df06c
Faster floating point allocator, same idea as the int allocator.
...
By Aaron Watters.
1997-05-13 21:00:42 +00:00
Guido van Rossum
789a1613a0
Add optional 'sizehint' argument to readlines(). After approximately
...
this many bytes have been read, readlines stops. Because of
buffering, the amount of bytes read is usually at least 8K more than
the hint.
Also changed read() and readline() to use PyArg_ParseTuple().
(Note that the *previous* checkin also fixed error handling and
narrowed the range of thread unblocking for all methods using
fread().)
1997-05-10 22:33:55 +00:00
Guido van Rossum
6263d5451c
Rewrite readlines() to speed it up -- about a factor of 2 on my
...
Indigo2, reading a 9Meg file from the local disk.
1997-05-10 22:07:25 +00:00
Guido van Rossum
5449b6e123
Speed up read() (i.e. read till EOF) considerably by doing a stat() to
...
see if we can guess the #bytes until the end of the file. If we
can't, increment the buffer size increments up to 0.5Meg to avoid
realloc'ing too much.
1997-05-09 22:27:31 +00:00
Guido van Rossum
0add15f6a5
removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits.
1997-05-09 01:07:15 +00:00
Guido van Rossum
b819914263
Fix by Mark Hammond to enable truncate() on Windows.
1997-05-06 15:23:24 +00:00
Guido van Rossum
fdf95dd525
Checkin of Jack's buffer mods.
...
Not really checked, but didn't fail any tests either...
1997-05-05 22:15:02 +00:00
Guido van Rossum
a027efa5bf
Massive changes for separate thread state management.
...
All per-thread globals are moved into a struct which is manipulated
separately.
1997-05-05 20:56:21 +00:00
Guido van Rossum
c0b618a2cc
Quickly renamed the last directory.
1997-05-02 03:12:38 +00:00
Guido van Rossum
1875247549
Quickly renamed.
1997-04-29 14:49:28 +00:00
Guido van Rossum
3648884490
(Jack:) Align mapping entries to 4-words if USE_CACHE_ALIGNED is defined.
1997-04-11 19:14:07 +00:00
Guido van Rossum
2095d24842
Tweaks to keep the Microsoft compiler quiet.
1997-04-09 19:41:24 +00:00
Guido van Rossum
8017767420
Remove unused variable.
1997-04-09 18:22:28 +00:00
Guido van Rossum
6191551ad6
Remove a redundant XINCREF(value). This caused the reference count of
...
all locals to be upped by one when `from <module> import <whatever>'
was executed.
1997-04-03 18:31:43 +00:00
Guido van Rossum
4669fb474b
Several fixes reported by jim F.
1997-04-02 05:31:09 +00:00
Guido van Rossum
c054d70aee
Get rid of .conj pseudo data attribute for complex numbers.
...
Add __members__ attribute.
1997-04-01 03:12:33 +00:00
Guido van Rossum
fb8f1cadb2
Add clear() method to dictionary objects.
1997-03-21 21:55:12 +00:00
Guido van Rossum
f2e499b1d7
New long_lshift, without restriction on size of shift count, by Tim Peters.
...
This makes it possible to write 1L<<1000000, memory permitting.
1997-03-16 00:37:59 +00:00
Guido van Rossum
45b83915f8
New form of PyFPE_END_PROTECT macro.
1997-03-14 04:32:50 +00:00
Guido van Rossum
19700b6a98
Add casts to CMPERROR macro to silence SunPro compiler warnings about
...
integer overflow in << operator.
1997-03-05 00:45:43 +00:00
Guido van Rossum
09e6ad0c1e
Changes for Lee Busby's SIGFPE patch set.
...
Surround various f.p. operations with PyFPE_{START,END}_PROTECT macros.
1997-02-14 22:54:21 +00:00
Guido van Rossum
0f4bbd2f34
Keep gcc -Wall happy.
1997-02-14 21:12:56 +00:00
Guido van Rossum
36b9f7908a
Slight tweak: in string_hash(), if the hash hasn't been computed yet,
...
and if there's a pointer to an interned version of the string, use its
hash and store its hash in this object, rather than recomputing it.
1997-02-14 16:29:22 +00:00
Guido van Rossum
7582bfb60a
Kill all local variables when the frame is deallocated (moved here
...
from ceval.c).
Wrapped a long line.
1997-02-14 16:27:29 +00:00
Guido van Rossum
efb4609c4a
Small lookmapping nits:
...
- remove bogus initialization using uninitialized i
- derive initial incr from hash
- copy mp->ma_table into a local variable
1997-01-29 15:53:56 +00:00
Guido van Rossum
4acdc2327f
Fix bug reported by Per Lindqvist: "%#06x" % 1 stuck the 0 padding
...
in front of the 0x, like such: "0000x1".
1997-01-29 06:00:24 +00:00
Guido van Rossum
9e5656ca3f
Final three poly table entries corrected by Tim Peters.
...
Reindented the whole table.
1997-01-29 04:45:16 +00:00
Guido van Rossum
16e93a8d59
Changed the lookup algorithm again, based on Reimer Behrends's post.
...
The table size is now constrained to be a power of two, and we use a
variable increment based on GF(2^n)-{0} (not that I have the faintest
idea what that is :-) which helps avoid the expensive '%' operation.
Some of the entries in the table of polynomials have been modified
according to a post by Tim Peters.
1997-01-28 00:00:11 +00:00
Guido van Rossum
747596a491
When a recycled frame has more local+stack slots than needed,
...
give the extra slots to the stack rather than than forgetting about
them (this reduces the number of reallocs done).
1997-01-24 04:00:21 +00:00
Guido van Rossum
ca756f2a1d
Forget keeping track of whether a dictionary contains all interned
...
string keys. Just doing a pointer compare before the string compare
(in fact before the hash compare!) is just as fast.
1997-01-23 19:39:29 +00:00
Guido van Rossum
e0e696282f
Added PyCObject_Import.
1997-01-22 20:48:48 +00:00
Guido van Rossum
a04d47b319
Don't use static buffers internally for formatstring().
1997-01-21 16:12:09 +00:00
Guido van Rossum
3bb63a8dbe
Bugfix: remove ref to fast before it's defined.
1997-01-20 04:29:16 +00:00