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!).
to PyCode_New() argument list. Move MAXBLOCKS constant to conpile.h.
Added accurate calculation of the actual stack size needed by the
generated code.
Also commented out all fprintf statements (except for a new one to
diagnose stack underflow, and one in #ifdef'ed out code), and added
some new TO DO suggestions (now that the stacksize is taken of the TO
DO list).
dis() still disassembles the last frame of the lats stack trace.
dis(x) disassembles x, which may be a code object, function, or method.
disassemble(co, [lasti]) disassembles a code object; the lasti
argument is now optional.
disco(...) is an alias for disassemble(...), for backward compatibility.
to Python. Minimal documentation is included in comments at the top
of the file, and in the Misc/PURIFY.README file. Note that this
module must be statically linked since Pure doesn't provide shared
stubs libraries.
(Setup.in): Added commented template for pure module
(syslogmodule.c): ins() function wasn't declared static.
big-endian machines. This is done by directing the struct module's pack
and unpack methods to treat the data always in bin endian format.
This has been tested on irix (big endian) and solaris x86 (little endian)
but not yet on the mac.
unsigned. This fixes the 8bit-char-in-key platform incompatibility.
I also removed the old backwards compatibility code, and the commented
lisp rotor code. I retained the lisp docstrings as comments preceding
each function.
the imagefiles and converting tham to a format suitable for imageop. Also
added two more tests 'rgb2rgb8' and 'rgb82rgb' which remove the dependence
on the file 'greytest.rgb'.
Note: test_imgfile.py still uses 'greytest.rgb'
- Quieted gcc -Wall by removing unused local variables.
- Added some choice parentheses around assignments in conditional
tests.
- Removed an unused (and seemingly unreachable) err label in
load_short_binstring().
- in Unpickler_load(), removed \. in string format.
- init_stuff() was declared to return an int, but had these
problems:
- it was returning NULL instead of 0 or 1 in some cases
- it was falling of the end of the routine without returning
anything
- the call of init_stuff() in initcPickle() was never checking
the return value anyway.
I changed all this by returning 1 in the case of errors, 0 when
no error occurred. Then in initcPickle(), if init_stuff()
returns non-zero, I call Py_FatalError().
Suppressing my urge to reformat according to Python coding standards!
:-)