Commit Graph

290 Commits

Author SHA1 Message Date
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
Guido van Rossum 7e3090cf08 newclassobject() gets a third argument 1991-10-20 20:26:16 +00:00
Guido van Rossum df62e44f38 Changed many calls to dict stufff to dict2 variants.
*** Somehow the call to printobject was changed back to fwrite?!?! ***
1991-08-16 08:56:04 +00:00
Guido van Rossum 83bf35cb27 Add interface to call a Python function (or other callable) object
from C.
1991-07-27 21:32:34 +00:00
Guido van Rossum a60810973d Call printobject instead of fwrite to print strings. 1991-07-22 11:48:07 +00:00
Guido van Rossum 89d55cad95 Call coerce() in arithmetic operations, to support mixed mode arithmetic 1991-07-01 18:43:13 +00:00
Guido van Rossum 909336104b printobject now returns an error code 1991-06-07 16:10:43 +00:00
Guido van Rossum 067b9c0aef Remove test for unimplemented sq_repeat method (see tupleobject comments) 1991-06-04 19:36:54 +00:00
Guido van Rossum 4965bc8ac4 Declare ticker as int; made testbool generic for all numeric types 1991-05-14 11:51:49 +00:00
Guido van Rossum e8122f19a0 Renamed class methods to instance methods (which they are) 1991-05-05 20:03:07 +00:00
Guido van Rossum 374a92261b Moved support functions after main function; added prototypes;
Fixed 'needspace' hack to use a flag in the stdout file object;
added local and global variable lookup cases.
1991-04-04 10:40:29 +00:00
Guido van Rossum b8824952cb Define and use GETNAMEV macro. 1991-04-03 18:59:50 +00:00
Guido van Rossum f70e43a073 Added copyright notice. 1991-02-19 12:39:46 +00:00
Guido van Rossum 86cd6e646e File name shortening. 1991-01-21 15:12:35 +00:00
Guido van Rossum 40d0b7e904 Change div() into divide(); div() is a Standard C function. 1990-12-20 23:03:11 +00:00
Guido van Rossum 3f5da24ea3 "Compiling" version 1990-12-20 15:06:42 +00:00
Guido van Rossum e9736fc8a1 Free parse tree after compiling.
Added support for class definitions.
Reorganized main interpreter loop to fetch op and arg once at the head.
Use two bytes for arguments (see ceval.c).
1990-11-18 17:33:06 +00:00
Guido van Rossum 10dc2e8097 Initial revision 1990-11-18 17:27:39 +00:00