Tim Peters [Wed, 31 Jan 2001 01:16:47 +0000 (01:16 +0000)]
SF bug #130532: newest CVS won't build on AIX.
Removed illegal redefinition of REPR macro; kept the one with the
argument name that isn't too easy to confuse with zero <wink>.
Jeremy Hylton [Tue, 30 Jan 2001 01:24:43 +0000 (01:24 +0000)]
Enforce two illegal import statements that were outlawed in the
reference manual but not checked: Names bound by import statemants may
not occur in global statements in the same scope. The from ... import *
form may only occur in a module scope.
I guess these changes could break code, but the reference manual
warned about them.
Several other small changes
If a variable is declared global in the nearest enclosing scope of a
free variable, then treat it is a global in the nested scope too.
Get rid of com_mangle and symtable_mangle functions and call mangle
directly.
If errors occur during symtable table creation, return -1 from
symtable_build().
Do not increment st_errors in assignment to lambda, because exception
is not set.
Add extra argument to symtable_assign(); the argument, flag, is ORed
with DEF_LOCAL for each symtable_add_def() call.
Jeremy Hylton [Mon, 29 Jan 2001 22:51:52 +0000 (22:51 +0000)]
Remove f_closure slot of frameobject and use f_localsplus instead.
This change eliminates an extra malloc/free when a frame with free
variables is created. Any cell vars or free vars are stored in
f_localsplus after the locals and before the stack.
eval_code2() fills in the appropriate values after handling
initialization of locals.
To track the size the frame has an f_size member that tracks the total
size of f_localsplus. It used to be implicitly f_nlocals + f_stacksize.
Jack Jansen [Mon, 29 Jan 2001 14:07:01 +0000 (14:07 +0000)]
Accessor functions for regions and such expect an existing region as parameter. Fixed for grafport attribute access.
Got GetPortBitMapForCopyBits() and port.portBits to work.
Fixed posixpath.normpath() to respect two leading slashes, but
turn three or more into a single slash. (This is in sync with POSIX
susv2 according to Fredrik.)
Moshe Zadka [Mon, 29 Jan 2001 06:21:17 +0000 (06:21 +0000)]
The one thing I love more then writing code is deleting code.
* Removed func_hash and func_compare, so they can be treated as immutable
content-less objects (address hash and comparison)
* Added tests to that affect to test_funcattrs (also testing func_code
is writable)
* Reverse meaning of tests in test_opcodes which checked identical code
gets identical functions
Skip Montanaro [Sun, 28 Jan 2001 21:11:12 +0000 (21:11 +0000)]
allow first param urlencode to be a sequence of two-element tuples - in this
case, the order of parameters in the output matches the order of the inputs.
Fred Drake [Sun, 28 Jan 2001 03:55:09 +0000 (03:55 +0000)]
new_instance(): Use PyInstance_NewRaw() instead of knowing too much
about the internal initialization of instance objects. Make the
dict parameter optional, and allow None as equivalent to omission.
Tim Peters [Sun, 28 Jan 2001 00:27:39 +0000 (00:27 +0000)]
It's unclear whether PyMarshal_XXX() are part of the public or private API.
They're named as if public, so I did a Bad Thing by changing
PyMarshal_ReadObjectFromFile() to suck up the remainder of the file in one
gulp: anyone who counted on that leaving the file pointer merely at the
end of the next object would be screwed. So restored
PyMarshal_ReadObjectFromFile() to its earlier state, renamed the new greedy
code to PyMarshal_ReadLastObjectFromFile(), and changed Python internals to
call the latter instead.
Martin v. Löwis [Sat, 27 Jan 2001 08:38:34 +0000 (08:38 +0000)]
Merge changes of PyXML 1.13:
Use nodeName, not tagName in attributes.
Provide get method for dictionary-like objects.
Use DOM exceptions instead of standard exceptions.
Tim Peters [Sat, 27 Jan 2001 06:20:08 +0000 (06:20 +0000)]
SF bug http://sourceforge.net/bugs/?func=detailbug&bug_id=130242&group_id=5470
SF patch http://sourceforge.net/patch/?func=detailpatch&patch_id=103453&group_id=5470
PyMember_Set of T_CHAR always raises exception.
Unfortunately, this is a use of a C API function that Python itself never makes, so
there's no .py test I can check in to verify this stays fixed. But the fault in the
code is obvious, and Dave Cole's patch just as obviously fixes it.
Remaining single-line change from patch #102409: to install shared modules,
run setup.py with the --install-platlib flag so you can override
'prefix' when running make (e.g. make prefix=/tmp/python/usr/local install)
Instead of using mkdir to create directories, use install -d (mkdir -p
apparently isn't portable)
Emacs make-mode reported line 371 as suspicious; removed the whitespace from
that line.
Be extra careful with linking against libtermcap. This is now only done
if we can find the libtermcap in the usual places. Some platforms don't
have libtermcap, e.g. MacOSX.
Neil Schemenauer [Fri, 26 Jan 2001 16:18:16 +0000 (16:18 +0000)]
- LIBRARY is now a SUBST variable.
- Add CFLAGSFORSHARED variable. configure sets this to CCSHARED if LDLIBRARY
is a shared library.
- Remove -fPIC from OPT, it has no business there.
- Change CCSHARED option for Linux to -fPIC. It should probably be
-fPIC on a few other platforms as well.
- Don't create silly boot Makefile, create Setup files and run makesetup
instead.
Neil Schemenauer [Fri, 26 Jan 2001 16:14:41 +0000 (16:14 +0000)]
- Add CFLAGSFORSHARED variable. configure sets this to CCSHARED if LDLIBRARY
is a shared library.
- Add PY_CFLAGS variable (flags used to compile the interpreter)
- clobber now just removes object files, libraries and binaries