summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* * Fixed some subtleties with fastlocals. You can no longer accessGuido van Rossum1993-03-301-0/+2
| | | | | | | | | | | | | | | | | | f_fastlocals in a traceback object (this is a core dump hazard if there are <nil> entries), but instead eval_code() merges the fast locals back into the locals dictionary if it looks like the local variables will be retained. Also, the merge routines save exceptions since this is sometimes needed (alas!). * Added id() to bltinmodule.c, which returns an object's address (identity). Useful to walk arbitrary data structures containing cycles. * Added compile() to bltinmodule.c and compile_string() to pythonrun.[ch]: support to exec/eval arbitrary code objects. The code that defaults globals and locals is moved from run_node in pythonrun.c (which is now identical to eval_node) to eval_code in ceval.c. [XXX For elegance a clean-up session is necessary.]
* Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum1993-03-303-8/+9
| | | | | | lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-2941-102/+111
| | | | | | | | | | | | | | | | | * 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
* Generalized version of dictionaries, with compatibility hacks.Guido van Rossum1993-03-271-0/+43
|
* * Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum1993-03-162-4/+17
| | | | | | | | | | * Fixcprt.py: added [-y file] option, do only files younger than file. * modsupport.[ch]: added vmkvalue(). * intobject.c: use mkvalue(). * stringobject.c: added "formatstring"; renamed string* to string_*; ceval.c: call formatstring for string % value. * longobject.c: close memory leak in divmod. * parsetok.c: set result node to NULL when returning an error.
* * Added Fixcprt.py: script to fix copyright message.Guido van Rossum1993-01-262-4/+9
| | | | | | | | | | | * various modules: added 1993 to copyright. * thread.c: added copyright notice. * ceval.c: minor change to error message for "+" * stdwinmodule.c: check for error from wfetchcolor * config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h) * Add declaration of inittab to import.h * sysmodule.c: added sys.builtin_module_names * xxmodule.c, xxobject.c: fix minor errors
* * Configure.py: use #!/usr/local/bin/pythonGuido van Rossum1993-01-041-1/+0
| | | | | | | | | | | * posixmodule.c: move extern function declarations to top * listobject.c: cmp() arguments must be void* if __STDC__ * Makefile, allobjects.h, panelmodule.c, modsupport.c: get rid of strdup() -- it is a portability risk * Makefile: enclosed ranlib command in parentheses for Sequent Make which aborts if the command is not found even if '-' is present * timemodule.c: time() returns a floating point number, in microsecond precision if BSD_TIME is defined.
* * mymalloc.h: always allocate one extra byte, since some malloc'sGuido van Rossum1992-12-141-3/+5
| | | | | | | | | | | | | return NULL for malloc(0) or realloc(p, 0). (This should be done differently than wasting one byte, but alas...) * Moved "add'l libraries" option in Makefile to an earlier place. * Remove argument compatibility hacks (b) and (c). * Add grey2mono, dither2mono and mono2grey to imageop. * Dup the fd in socket.fromfd(). * Added new modules mpz, md5 (by JH, requiring GNU MP 1.2). Affects Makefile and config.c. * socketmodule.c: added socket.fromfd(fd, family, type, [proto]), converted socket() to use of getargs().
* * bltinmodule.c: added built-in function cmp(a, b)Guido van Rossum1992-10-181-0/+4
| | | | | | | | | | | | | | | * flmodule.c: added {do,check}_only_forms to fl's list of functions; and don't print a message when an unknown object is returned. * pythonrun.c: catch SIGHUP and SIGTERM to do essential cleanup. * Made jpegmodule.c smaller by using getargs() and mkvalue() consistently. * Increased parser stack size to 500 in parser.h. * Implemented custom allocation of stack frames to frameobject.c and added dynamic stack overflow checks (value stack only) to ceval.c. (There seems to be a bug left: sometimes stack traces don't make sense.)
* Modified most (but not yet all) I/O to always go through sys.stdout orGuido van Rossum1992-09-252-2/+2
| | | | | | sys.stderr or sys.stdin, and to work with any object as long as it has a write() (respectively readline()) methods. Some functions that took a FILE* argument now take an object* argument.
* Made builtins int(), long(), float(), oct() and hex() more generic.Guido van Rossum1992-09-121-0/+5
|
* Added C++ support in thread.h; don't use signals if not strictlySjoerd Mullender1992-09-112-10/+24
| | | | | necessary, and when they are, use SIGKILL; when compiled with -DDEBUG, only print debug messages when "THREADDEBUG" is set in the environment.
* Correct spelling in function nameGuido van Rossum1992-09-031-1/+1
|
* AOnly define NDEDBUG if DEBUG is not definedGuido van Rossum1992-09-031-0/+3
|
* * renamed malloc.h mymalloc.h, and added MALLARG as the type of theGuido van Rossum1992-08-193-2/+76
| | | | | | | | argument to malloc() (size_t or unsigned int) * listobject.c: check for overflow of the size of the object, so things like range(0x7fffffff) will raise MemoryError instead of calling malloc() with -4 (and then crashing -- malloc's fault)
* New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()Guido van Rossum1992-08-172-0/+18
| | | | to avoid hanging in cleanup().
* * classobject.[ch], {float,long,int}object.c, bltinmodule.c:Guido van Rossum1992-08-142-1/+1
| | | | | | 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.
* Changes so that user-defined classes can implement operations invokedGuido van Rossum1992-08-122-3/+6
| | | | | by special syntax: you can now define your own numbers, sequences and mappings.
* * Makefile: cosmeticsGuido van Rossum1992-08-052-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | * socketmodule.c: get rid of makepair(); fix makesocketaddr to fix broken recvfrom() * socketmodule: get rid of getStrarg() * ceval.h: move eval_code() to new file eval.h, so compile.h is no longer needed. * ceval.c: move thread comments to ceval.h; always make save/restore thread functions available (for dynloaded modules) * cdmodule.c, listobject.c: don't include compile.h * flmodule.c: include ceval.h * import.c: include eval.h instead of ceval.h * cgen.py: add forground(); noport(); winopen(""); to initgl(). * bltinmodule.c, socketmodule.c, fileobject.c, posixmodule.c, selectmodule.c: adapt to threads (add BGN/END SAVE macros) * stdwinmodule.c: adapt to threads and use a special stdwin lock. * pythonmain.c: don't include getpythonpath(). * pythonrun.c: use BGN/END SAVE instead of direct calls; also more BGN/END SAVE calls etc. * thread.c: bigger stack size for sun; change exit() to _exit() * threadmodule.c: use BGN/END SAVE macros where possible * timemodule.c: adapt better to threads; use BGN/END SAVE; add longsleep internal function if BSD_TIME; cosmetics
* * Makefile adapted to changes below.Guido van Rossum1992-08-042-0/+54
| | | | | | | | | | | * split pythonmain.c in two: most stuff goes to pythonrun.c, in the library. * new optional built-in threadmodule.c, build upon Sjoerd's thread.{c,h}. * new module from Sjoerd: mmmodule.c (dynamically loaded). * new module from Sjoerd: sv (svgen.py, svmodule.c.proto). * new files thread.{c,h} (from Sjoerd). * new xxmodule.c (example only). * myselect.h: bzero -> memset * select.c: bzero -> memset; removed global variable
* * myselect.h: bzero -> memsetGuido van Rossum1992-08-041-1/+1
| | | | * select.c: bzero -> memset; removed global variable
* Changes for new UNIX-specific built-in module 'select' and new header forGuido van Rossum1992-06-231-0/+80
| | | | | interfaces to variants of select() system call, "myselect.h". This includes adding fileno() methods to files, sockets and stdwin.
* added BYTE, CHAR and unsigned variantsGuido van Rossum1992-06-031-0/+8
|
* Added declaration for mkvalue()Guido van Rossum1992-04-131-0/+1
|
* Copyright for 1992 addedGuido van Rossum1992-04-0542-42/+42
|
* lint (added flushline() interface)Guido van Rossum1992-03-271-0/+1
|
* Make it lint-freeGuido van Rossum1992-03-271-0/+1
|
* *** empty log message ***Guido van Rossum1992-03-241-62/+44
|
* Moved definition of search path DELIM here (from sysmodule.c).Guido van Rossum1992-03-231-0/+9
|
* Added definitions of sys_trace and sys_profileGuido van Rossum1992-03-231-0/+2
|
* Initial revisionGuido van Rossum1992-02-261-0/+43
|
* New getargs() function. Define macros with conventional names,Guido van Rossum1992-01-271-0/+28
| | | | except get*str*arg --> get*Str*arg; get*str*arg fetches a C string.
* Initial revisionGuido van Rossum1992-01-191-0/+26
|
* Added typedef for longobject and declarations for long_{format,scan}.Guido van Rossum1992-01-191-0/+5
|
* Move the longobject typedef to longobject.h.Guido van Rossum1992-01-191-9/+4
| | | | Remove some functions that need not be exported.
* New function gettupleslice(v, i, j).Guido van Rossum1992-01-141-0/+1
|
* Change tb_here() prototype.Guido van Rossum1992-01-141-1/+1
|
* Added UNPACK_VARARG.Guido van Rossum1992-01-141-0/+1
|
* Added f_lasti and f_lineno members.Guido van Rossum1992-01-141-0/+2
|
* Added SystemExit.Guido van Rossum1991-12-312-0/+2
|
* Added ImportError.Guido van Rossum1991-12-242-0/+2
|
* Regularize exceptions.Guido van Rossum1991-12-162-22/+18
|
* Added UNPACK_ARG.Guido van Rossum1991-12-161-1/+3
|
* Add "varargs" attribute.Guido van Rossum1991-12-161-3/+5
|
* SyntaxError.Guido van Rossum1991-12-162-0/+2
|
* Added _GLOBAL opcodes.Guido van Rossum1991-12-101-0/+2
|
* New exceptions.Guido van Rossum1991-12-102-12/+16
|
* Added shift and mask ops.Guido van Rossum1991-10-242-3/+15
|
* Added shifting and masking ops to as_number structGuido van Rossum1991-10-241-0/+6
|
* Added some new tokensGuido van Rossum1991-10-201-3/+9
|