| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
(classobject.[ch] aren't empty yet because they also define PyMethod.)
This breaks lots of stuff, notably cPickle. But it's a step in the right
direction. I'll clean it up later.
(Also a few unrelated changes, e.g. T_NONE to define a "struct member"
that is always None, and simplification of __hash__ -- these are unfinished.)
|
| |
|
|
|
|
| |
out whether __del__ exists, without executing any Python-level code.
|
|
|
|
| |
Thanks to Skip Montanaro and Kalle Svensson for the patches.
|
|
|
|
| |
conversation with Robin Dunn in SF patch #490402.
|
|
|
|
|
|
| |
While not even documented, they were clearly part of the C API,
there's no great difficulty to support them, and it has the cool
effect of not requiring any changes to ExtensionClass.c.
|
| |
|
|
|
|
| |
method types.
|
| |
|
| |
|
| |
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
| |
PySequence methods and functions, new tokens.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
macros for more efficient access to the fields.
|
|
|
|
| |
was some locking code in this file that needed it...
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
use the new names exclusively, and the linker will see the new names.
Files that import "Python.h" also only see the new names. Files that
import "allobjects.h" will continue to be able to use the old names,
due to the inclusion (in allobjects.h) of "rename2.h".
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
classobject.h: added instancebinop()
modsupport.h: added newgetargs()
rename1.h: removed Py_FPROTO
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
and __setattr__ support to override getattr(x, name) and
setattr(x, name, value) for class instances. This uses a special
hack whereby the class is supposed to be static: the __getattr__
and __setattr__ methods are looked up only once and saved in the
instance structure for speed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* posixmodule.c: don't prototype getcwd() -- it's not portable...
* mappingobject.c: double-check validity of last_name_char in
dict{lookup,insert,remove}.
* arraymodule.c: need memmove only for non-STDC Suns.
* Makefile: comment out HTML_LIBS and XT_USE by default
* pythonmain.c: don't prototype getopt() -- it's not standardized
* socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to
recvfrom() to (ANY*).
* pythonrun.c (initsigs): fix prototype, make it static
* intobject.c (LONG_BIT): only #define it if not already defined
* classobject.[ch]: remove all references to unused instance_convert()
* mappingobject.c (getmappingsize): Don't return NULL in int function.
|
|
|
|
|
|
|
| |
* 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++.
|
|
|
|
|
|
|
| |
* Added "access *: ...", made access work for class methods.
* Introduced subclass check: make sure that when calling
ClassName.methodname(instance, ...), the instance is an instance of
ClassName or of a subclass thereof (this might break some old code!)
|
|
|
|
|
|
|
| |
yet). The class is now passed to eval_code and stored in the current
frame. It is also stored in instance method objects. An "unbound"
instance method is now returned when a function is retrieved through
"classname.funcname", which when called passes the class to eval_code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) dictionaries/mappings now have attributes values() and items() as
well as keys(); at the C level, use the new function mappinggetnext()
to iterate over a dictionary.
(2) "class C(): ..." is now illegal; you must write "class C: ...".
(3) Class objects now know their own name (finally!); and minor
improvements to the way how classes, functions and methods are
represented as strings.
(4) Added an "access" statement and semantics. (This is still
experimental -- as long as you don't use the keyword 'access' nothing
should be changed.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
coercion is now completely generic.
* ceval.c: for instances, don't coerce for + and *; * reverses
arguments if left one is non-instance numeric and right one sequence.
|
|
|
|
|
| |
by special syntax: you can now define your own numbers, sequences and
mappings.
|
| |
|
| |
|
|
|
|
| |
,.
|
| |
|
| |
|
| |
|
|
|