Commit Graph

92 Commits

Author SHA1 Message Date
Guido van Rossum 34679b7661 * Added Fixcprt.py: script to fix copyright message.
* 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
1993-01-26 13:33:44 +00:00
Guido van Rossum a2b7f40513 * Configure.py: use #!/usr/local/bin/python
* 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.
1993-01-04 09:09:59 +00:00
Guido van Rossum 5f59d6018e * mymalloc.h: always allocate one extra byte, since some malloc's
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().
1992-12-14 16:59:51 +00:00
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 1899c2e055 Made builtins int(), long(), float(), oct() and hex() more generic. 1992-09-12 11:09:23 +00:00
Sjoerd Mullender d10d8291f1 Added C++ support in thread.h; don't use signals if not strictly
necessary, and when they are, use SIGKILL; when compiled with -DDEBUG,
only print debug messages when "THREADDEBUG" is set in the environment.
1992-09-11 15:19:27 +00:00
Guido van Rossum 3702284d2a Correct spelling in function name 1992-09-03 20:46:06 +00:00
Guido van Rossum f2c8beba0b AOnly define NDEDBUG if DEBUG is not defined 1992-09-03 20:34:07 +00:00
Guido van Rossum 1e28e5e596 * renamed malloc.h mymalloc.h, and added MALLARG as the type of the
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)
1992-08-19 16:46:30 +00:00
Guido van Rossum f9f2e82fca New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()
to avoid hanging in cleanup().
1992-08-17 08:59:08 +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 4fbf798f86 * myselect.h: bzero -> memset
* select.c: bzero -> memset; removed global variable
1992-08-04 09:13:45 +00:00
Guido van Rossum ed233a5696 Changes for new UNIX-specific built-in module 'select' and new header for
interfaces to variants of select() system call, "myselect.h".  This includes
adding fileno() methods to files, sockets and stdwin.
1992-06-23 09:07:03 +00:00
Guido van Rossum 000239517d added BYTE, CHAR and unsigned variants 1992-06-03 17:07:40 +00:00
Guido van Rossum 5a8f824933 Added declaration for mkvalue() 1992-04-13 15:54:59 +00:00
Guido van Rossum 5113f5fd34 Copyright for 1992 added 1992-04-05 14:20:22 +00:00
Guido van Rossum 704a26c5f3 lint (added flushline() interface) 1992-03-27 17:29:31 +00:00
Guido van Rossum 559e55f73c Make it lint-free 1992-03-27 17:23:59 +00:00
Guido van Rossum c1b5cec10e *** empty log message *** 1992-03-24 13:46:39 +00:00
Guido van Rossum 9b9ccd3fe3 Moved definition of search path DELIM here (from sysmodule.c). 1992-03-23 18:20:32 +00:00
Guido van Rossum d510c786b8 Added definitions of sys_trace and sys_profile 1992-03-23 18:20:04 +00:00
Guido van Rossum 355a33dc6e Initial revision 1992-02-26 15:19:31 +00:00
Guido van Rossum 550fbcc2aa New getargs() function. Define macros with conventional names,
except get*str*arg --> get*Str*arg; get*str*arg fetches a C string.
1992-01-27 16:50:21 +00:00
Guido van Rossum b674c3bba5 Initial revision 1992-01-19 16:32:47 +00:00
Guido van Rossum 44c8f69ff2 Added typedef for longobject and declarations for long_{format,scan}. 1992-01-19 16:31:28 +00:00
Guido van Rossum 3d09543472 Move the longobject typedef to longobject.h.
Remove some functions that need not be exported.
1992-01-19 16:30:12 +00:00
Guido van Rossum 7c36ad7f44 New function gettupleslice(v, i, j). 1992-01-14 18:45:33 +00:00
Guido van Rossum 11c03836a2 Change tb_here() prototype. 1992-01-14 18:45:09 +00:00
Guido van Rossum 22f863feee Added UNPACK_VARARG. 1992-01-14 18:38:56 +00:00
Guido van Rossum 088bc2ad3c Added f_lasti and f_lineno members. 1992-01-14 18:32:11 +00:00
Guido van Rossum 768a3f0ab8 Added SystemExit. 1991-12-31 13:13:47 +00:00
Guido van Rossum 85fc392b9e Added ImportError. 1991-12-24 13:26:33 +00:00
Guido van Rossum fb905c3ebf Regularize exceptions. 1991-12-16 15:42:38 +00:00
Guido van Rossum 750bf14c32 Added UNPACK_ARG. 1991-12-16 13:07:35 +00:00
Guido van Rossum c06022966f Add "varargs" attribute. 1991-12-16 13:07:24 +00:00
Guido van Rossum a317365eb2 SyntaxError. 1991-12-16 13:06:04 +00:00
Guido van Rossum 97ff5308fe Added _GLOBAL opcodes. 1991-12-10 13:59:17 +00:00
Guido van Rossum 876336bc7d New exceptions. 1991-12-10 13:56:23 +00:00
Guido van Rossum 7928cd7636 Added shift and mask ops. 1991-10-24 14:59:31 +00:00
Guido van Rossum 7a6dfa7d79 Added shifting and masking ops to as_number struct 1991-10-24 14:58:18 +00:00
Guido van Rossum 8883aaa5eb Added some new tokens 1991-10-20 20:24:45 +00:00
Guido van Rossum 2b9d6e2008 newclassobject gets a third parameter (optional class name) 1991-10-20 20:12:10 +00:00
Guido van Rossum 4b3c1da660 Added/moved dict2 interfaces. 1991-08-16 09:00:42 +00:00
Guido van Rossum 4f4a55b90c Change getbuiltin interface to get the name as an object. 1991-08-16 08:55:53 +00:00
Guido van Rossum 18315a0ecd New syntax 1991-07-27 21:38:01 +00:00
Guido van Rossum a049031f2d Added call_object interface 1991-07-27 21:33:03 +00:00