Commit Graph

26 Commits

Author SHA1 Message Date
Jeremy Hylton d08b4c4524 part 2 of Neil Schemenauer's GC patches:
This patch modifies the type structures of objects that
participate in GC.  The object's tp_basicsize is increased when
GC is enabled.  GC information is prefixed to the object to
maintain binary compatibility.  GC objects also define the
tp_flag Py_TPFLAGS_GC.
2000-06-23 19:37:02 +00:00
Jeremy Hylton 8caad49c30 Round 1 of Neil Schemenauer's GC patches:
This patch adds the type methods traverse and clear necessary for GC
implementation.
2000-06-23 14:18:11 +00:00
Guido van Rossum b18618dab7 Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode.  I'm also holding back on his
change to main.c, which seems unnecessary to me.)
2000-05-03 23:44:39 +00:00
Guido van Rossum ec5b776998 Marc-Andre Lemburg:
Doc strings can now be given as Unicode strings.
2000-04-27 20:14:13 +00:00
Guido van Rossum 0dabacee16 Make function objects somewhat mutable -- the members func_code,
func_defaults and func_doc (alias __doc__) may be assigned to.  For
the first two, there's a type restriction to code object and tuple,
respectively.
1998-05-22 00:55:34 +00:00
Guido van Rossum 1109fbca76 Make new gcc -Wall happy 1998-04-10 22:16:39 +00:00
Guido van Rossum 83f9ad8399 Fix bug in comparing function objects detected by Sjoerd:
SystemError: bad argument to internal function

caused by comparing NULL pointer default args.
1997-08-05 16:51:05 +00:00
Guido van Rossum c0b618a2cc Quickly renamed the last directory. 1997-05-02 03:12:38 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum 2271bf7187 changes for keyword arguments and fast function call; added abstract.c 1995-07-18 14:30:34 +00:00
Guido van Rossum e9c6bcd813 fix leak in func_dealloc (forgot to decref name) 1995-01-20 16:58:19 +00:00
Guido van Rossum 10393b1708 add restrictions in restricted mode 1995-01-10 10:39:49 +00:00
Guido van Rossum 5bd3805ae9 Added __doc__ attribute (alias func_doc), initialized from first
constant in code object if it is a string, else None
1995-01-07 12:01:30 +00:00
Guido van Rossum 6610ad9d6b Added 1995 to copyright message.
floatobject.c: fix hash().
methodobject.c: support METH_FREENAME flag bit.
1995-01-04 19:07:38 +00:00
Guido van Rossum 1d5735e846 Merge back to main trunk 1994-08-30 08:27:36 +00:00
Guido van Rossum 590baa4a7a * import.c (get_module): pass .py filename to parse_file, not .pyc filename!
* funcobject.c (func_repr): don't call getstringvalue(None) for anonymous
  functions.
* bltinmodule.c: removed lambda (which is now a built-in function);
  removed implied lambda for string arg to filter/map/reduce.
* Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in
  function by lambda as grammar entity: instead of "lambda('x: x+1')" you
  write "lambda x: x+1".
* Xtmodule.c (checkargdict): return 0, not NULL, for error.
1993-11-30 13:40:46 +00:00
Guido van Rossum 2e8f8a398e Added compare operations for functions and code objects.
(Also hash, but it doesn't work yet.)
1993-11-05 10:20:10 +00:00
Guido van Rossum 25831652fd Several changes in one:
(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.)
1993-05-19 14:50:45 +00:00
Guido van Rossum 9bfef44d97 * Changed all copyright messages to include 1993.
* 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
1993-03-29 10:43:31 +00:00
Guido van Rossum bab9d03855 Copyright for 1992 added 1992-04-05 14:26:55 +00:00
Guido van Rossum a38c0ff7cd Added READONLY specifier to data members. 1992-01-14 18:32:20 +00:00
Guido van Rossum f70e43a073 Added copyright notice. 1991-02-19 12:39:46 +00:00
Guido van Rossum 3f5da24ea3 "Compiling" version 1990-12-20 15:06:42 +00:00
Guido van Rossum 846e431372 Function objects no longer contain a parse tree node, but intermediate
code.
1990-11-18 17:44:06 +00:00
Guido van Rossum 2a9096b5f9 New errors. 1990-10-21 22:15:08 +00:00
Guido van Rossum 85a5fbbdfe Initial revision 1990-10-14 12:07:46 +00:00