Commit Graph

567 Commits

Author SHA1 Message Date
Guido van Rossum
a9e7dc1081 * bltinmodule.c: added built-in function cmp(a, b)
* 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-10-18 18:53:57 +00:00
Guido van Rossum
3165fe6a56 Modified most (but not yet all) I/O to always go through sys.stdout or
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-25 21:59:05 +00:00
Guido van Rossum
99bec95482 Add some debugging features if DEBUG defined
(fetch the filename as a string so I can see it with dbx, and set f_lineno);
call abort() when detecting an "undetected" error.
1992-09-03 20:29:45 +00:00
Guido van Rossum
f9a2d33f01 fix *serious* (new) bug in testbool: by default objects should test
true, not false!!!
1992-08-19 16:41:45 +00:00
Guido van Rossum
e6eefc2231 * classobject.[ch], {float,long,int}object.c, bltinmodule.c:
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.
1992-08-14 12:06:52 +00:00
Guido van Rossum
04691fc1c1 Changes so that user-defined classes can implement operations invoked
by special syntax: you can now define your own numbers, sequences and
mappings.
1992-08-12 15:35:34 +00:00
Guido van Rossum
ff4949eeee * Makefile: cosmetics
* 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
1992-08-05 19:58:53 +00:00
Guido van Rossum
1984f1e1c6 * Makefile adapted to changes below.
* 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
1992-08-04 12:41:02 +00:00
Guido van Rossum
bd9ccca812 Test for NULL coming out of err_get() in call_exc_trace() 1992-04-09 14:58:08 +00:00
Guido van Rossum
801dcae64d reverse sense of test for CHECKEXC 1992-04-08 11:32:32 +00:00
Guido van Rossum
5b7313a982 Arg of cmp_outcome becomes an int for portability to the Mac 1992-04-06 13:24:57 +00:00
Guido van Rossum
eee3fd495a (Hopefully) fix bug in reference count in call_exc_trace()
plus minor rearrangements found during debugging
1992-04-05 14:18:13 +00:00
Guido van Rossum
0a066c07ac lint (added prototypes for all static fns) 1992-03-27 17:29:15 +00:00
Guido van Rossum
9c8d70de45 New trace implementation; and profile (in a similat vein). 1992-03-23 18:19:28 +00:00
Guido van Rossum
299a734744 Tighten error handling of string printing. 1992-03-04 16:39:08 +00:00
Guido van Rossum
9b1d33b105 Use correct prototype for invert(). 1992-02-11 15:56:02 +00:00
Guido van Rossum
16dfd29e44 Limit length of name passed to sprintf. 1992-02-05 11:17:30 +00:00
Guido van Rossum
8ec25b410c If sys.trace is None, don't trace. For exceptions, only use
the local trace function.
1992-01-19 16:26:13 +00:00
Guido van Rossum
6a3f9a841a Added UNPACK_VARARG code. 1992-01-14 18:29:20 +00:00
Guido van Rossum
96a42c85bc User trace feature. 1992-01-12 02:29:51 +00:00
Guido van Rossum
626dae7a42 Fix bug in assign_slice for negative index; used length of wrong object! 1992-01-10 00:28:07 +00:00
Guido van Rossum
98256aa518 Negative subscript are now allowed as in slices.
Added ImportError.
1991-12-24 13:25:19 +00:00
Guido van Rossum
9c7b861a00 New argument passing mechanism. 1991-12-16 13:04:47 +00:00
Guido van Rossum
32c6cdf776 Added STORE_GLOBAL and DELETE_GLOBAL.
Exceptions may now also be tuples.
1991-12-10 13:52:46 +00:00
Guido van Rossum
7928cd7636 Added shift and mask ops. 1991-10-24 14:59:31 +00:00