summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
AgeCommit message (Collapse)AuthorLines
1997-05-07Instead of importing graminit.h whenever one of the three grammar 'root'Guido van Rossum-4/+3
symbols is needed, define these in Python.h with a Py_ prefix.
1997-05-06Keep MS compiler happy: use (int)strlen() when comparing; make sureGuido van Rossum-2/+8
not to use kill().
1997-05-05Massive changes for separate thread state management.Guido van Rossum-8/+42
All per-thread globals are moved into a struct which is manipulated separately.
1997-04-02Allow passing a .pyo file.Guido van Rossum-5/+8
Print correct name in fatal error from PyErr_Print.
1997-03-05Greatly renamed. Not a very thorough job -- I'm going to restructureGuido van Rossum-209/+210
it anyway.
1997-02-14Added new global flag variable Py_InteractiveFlag and new functionGuido van Rossum-1/+22
Py_FdIsInteractive(). The flag is supposed to be set by the -i command line option. The function is supposed to be called instead of isatty(). This is used for Lee Busby's wish #1, to have an option that pretends stdin is interactive even when it really isn't.
1996-12-05Keep gcc -Wall happy.Guido van Rossum-0/+4
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-09-11Rationalized MS ifdefsGuido van Rossum-2/+2
1996-05-24rename printrefs, getobjects to _Py_ prefixGuido van Rossum-1/+1
1996-05-22Use new names for debug macros. Don't include pythonrun.h.Guido van Rossum-6/+5
1996-04-09Add'l change for NT (Mark H.).Guido van Rossum-0/+1
1995-10-27Moved mac-specific exit handling to macmain.cJack Jansen-21/+4
1995-10-07keep exitfunc alive while calling itGuido van Rossum-0/+2
1995-09-18#undef argument, for the MacGuido van Rossum-0/+1
1995-07-29mac CW-only fix for messy windows upon exitJack Jansen-1/+1
1995-07-18keyword arguments and faster callsGuido van Rossum-10/+3
1995-03-30flush stdout before writing to stderr in print_error()Guido van Rossum-0/+1
1995-03-29fix dusty debugging macrosGuido van Rossum-2/+2
1995-03-14In NT, write fatal() msg to debugging deviceGuido van Rossum-0/+10
1995-02-13mac changes:Jack Jansen-0/+8
- Assume files of types 'PYC ' and 'APPL' are compiled python code - For mwerks, show status line when program has terminated while keeping window open.
1995-02-07print class name for exceptions that are classesGuido van Rossum-2/+14
1995-02-02Under CodeWarrior, make the window go away on exit(0)Jack Jansen-0/+11
1995-01-30Think C mod to suppress pausing at normal exitGuido van Rossum-0/+8
1995-01-26make call_pyc_file staticGuido van Rossum-1/+4
1995-01-12use getbuiltins() everywhere, it defaults to getbuiltidict()Guido van Rossum-1/+1
1995-01-09__builtins__ mods (and sys_checkinterval for ceval.c)Guido van Rossum-0/+20
1995-01-04Added 1995 to copyright message.Guido van Rossum-5/+6
bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
1995-01-02Lots of changes, most minor (fatal() instead of abort(), use ofGuido van Rossum-8/+7
err_fetch/err_restore and so on). But... NOTE: import.c has been rewritten and all the DL stuff is now in the new file importdl.c.
1994-12-14Removed extraneous fclose() in case of .pyc file argumentJack Jansen-1/+1
1994-09-29 * Python/pythonrun.c: add string "Python" to fatal error messageGuido van Rossum-1/+1
1994-09-19 * Python/pythonrun.c (print_error): print only last line ofGuido van Rossum-0/+12
multi-line source line
1994-09-14 * Import/pythonrun.h, Python/{import,pythonrun}.c,Guido van Rossum-1/+47
mac/macsetfiletype.c: changes by Jack to execute .pyc file passed as command line argument. On the Mac .pyc files are given a special type so they can be double-clicked
1994-09-07added Py_AtExit() -- register cleanup functions for C modulesGuido van Rossum-0/+16
1994-08-29 * Python/pythonrun.c (print_error): added INCREF/DECREF pair --Guido van Rossum-82/+170
the exception returned by a syntax error (when reported) would contain an object with refcnt zero! MPW changes
1993-11-23* timemodule.c: Add hack for Solaris 2.Guido van Rossum-1/+1
* 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.
1993-11-01* ceval.c, longobject.c, methodobject.c, listnode.c, arraymodule.c,Guido van Rossum-1/+8
pythonrun.c: added static forward declarations * pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of static routines
1993-10-11* Extended X interface: pixmap objects, colormap objects visual objects,Sjoerd Mullender-0/+8
image objects, and lots of new methods. * Added counting of allocations and deallocations of builtin types if COUNT_ALLOCS is defined. Had to move calls to NEWREF down in some files. * Bug fix in sorting lists.
1993-07-05* Makefile: added all: and default: targets.Guido van Rossum-6/+6
* many files: made some functions static; removed "extern int errno;". * frozenmain.c: fixed bugs introduced on 24 June... * flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a (and some old functions that were omitted). * timemodule.c: added MSDOS floatsleep version . * pgenmain.c: changed exit() to goaway() and added defn of goaway(). * intrcheck.c: add hack (to UNIX only) so interrupting 3 times will exit from a hanging program. The second interrupt prints a message explaining this to the user.
1993-05-20Access checks now work, at least for instance data (not for methodsGuido van Rossum-1/+1
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.
1993-05-12* pythonrun.c: Print exception type+arg *after* stack trace instead ofGuido van Rossum-1/+1
before it. * ceval.c, object.c: moved testbool() to object.c (now extern visible) * stringobject.c: fix bugs in and rationalize string resize in formatstring() * tokenizer.[ch]: fix non-working code for lines longer than BUFSIZ
1993-03-30* Fixed some subtleties with fastlocals. You can no longer accessGuido van Rossum-21/+24
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.]
1993-03-30Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum-2/+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.
1993-03-29* Changed all copyright messages to include 1993.Guido van Rossum-2/+2
* 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
1992-10-18* bltinmodule.c: added built-in function cmp(a, b)Guido van Rossum-4/+45
* 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.)
1992-09-25Modified most (but not yet all) I/O to always go through sys.stdout orGuido van Rossum-8/+14
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.
1992-09-03Add sys.exitfunc feature. Make askync non-static.Guido van Rossum-1/+20
1992-08-17New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()Guido van Rossum-1/+8
to avoid hanging in cleanup().
1992-08-12To ignore a call, cast it to (void), not to (void *)...Guido van Rossum-1/+1
1992-08-05* Makefile: cosmeticsGuido van Rossum-13/+21
* 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