Commit Graph

332 Commits

Author SHA1 Message Date
Guido van Rossum 5a2a683e72 * filemodule.c: added writelines() -- analogous to readlines()
* import.c: fixed core dump when out-of-date .pyc file encountered (again!)
1993-10-25 09:59:04 +00:00
Sjoerd Mullender 52c1f51554 import.c: When something is wrong with the .pyc, properly open the .py
file.
object.c: Write allocation statistics to stderr.
1993-10-25 08:40:52 +00:00
Guido van Rossum 89b3325dc4 * import.c (MAGIC): Changed magic word to avoid confusion about exec
function vs. exec statement
* bltinmodule.c: renamed the module to __builtin__.
* posixmodule.c (posix_execv): renamed exec --> execv since it is now a
  reserved word.
1993-10-22 14:26:06 +00:00
Guido van Rossum cacd9579d4 * stdwinmodule.c (stdwin_done): interface to shutdown stdwin (now this is
no longer done by config.c).
* stdwinmodule.c (initstdwin), config.c (initall): get command line
  arguments from sys.argv instead of special-casing stdwin in config.c
* import.c (get_module): fix core dump when foomodule.o does not define
  initfoo().
* ChangeLog: documented changes by Sjoerd.
1993-10-18 11:44:47 +00:00
Guido van Rossum 21d335ed9e Makefile, import.c: Lance's alternative module search (allow .pyc file
without .py file); Bill's dynamic loading for SunOS using shared
libraries.

pwdmodule.c (mkgrent): remove DECREF of uninitialized variable.

classobject.c (instance_getattr): Fix case when class lookup returns
unbound method instead of function.
1993-10-15 13:01:11 +00:00
Guido van Rossum eb6b33a837 * classobject.c: in instance_getattr, don't make a method out of a
function found as instance data.
* socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite
  argument parsing in send/recv.
* More changes related to access (terminology change: owner instead of
  class; allow any object as owner; local/global variables are owned
  by their dictionary, only class/instance data is owned by the class;
  "from...import *" now only imports objects with public access; etc.)
1993-05-25 09:38:27 +00:00
Guido van Rossum 81daa32c15 Access checks now work, at least for instance data (not for methods
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-20 14:24:46 +00:00
Guido van Rossum 25831652fd Several changes in one:
(1) dictionaries/mappings now have attributes values() and items() as
well as keys(); at the C level, use the new function mappinggetnext()
to iterate over a dictionary.

(2) "class C(): ..." is now illegal; you must write "class C: ...".

(3) Class objects now know their own name (finally!); and minor
improvements to the way how classes, functions and methods are
represented as strings.

(4) Added an "access" statement and semantics.  (This is still
experimental -- as long as you don't use the keyword 'access' nothing
should be changed.)
1993-05-19 14:50:45 +00:00
Guido van Rossum f56e3db1dd Support for frozen scripts; added -i option. 1993-04-01 20:59:32 +00:00
Guido van Rossum 8b17d6bd89 Changes to speed up local variables enormously, by avoiding dictionary
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-30 13:18:41 +00:00
Guido van Rossum 9bfef44d97 * Changed all copyright messages to include 1993.
* 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
1993-03-29 10:43:31 +00:00
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 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 bab9d03855 Copyright for 1992 added 1992-04-05 14:26:55 +00:00
Guido van Rossum 4cd8b5cad8 Print messages about where from modules are imported when -v is given. 1992-03-27 17:21:04 +00:00
Guido van Rossum d8bac6de57 Move SEP to osdefs.h. Use MAXPATHLEN from osdefs.h. 1992-02-26 15:19:13 +00:00
Guido van Rossum e0513dee58 getbinaryname is now part of dl_loadmod. 1992-01-26 18:15:22 +00:00
Guido van Rossum e25c25635e Support for dynamic loading added. 1992-01-19 16:28:21 +00:00
Guido van Rossum 4135e78204 Use IOError and ImportError when import fails. 1991-12-24 13:26:56 +00:00
Guido van Rossum 6e93c07a06 Change RuntimeError into IOError when module file not found on reload. 1991-12-16 15:43:47 +00:00
Guido van Rossum 3ddee714d1 New magic word; and check it. 1991-12-16 13:06:34 +00:00
Guido van Rossum f0ada4a130 Use more dict2 functions./ 1991-08-16 09:01:08 +00:00
Guido van Rossum d6a15ada72 Generalize to macintosh. 1991-06-24 22:30:42 +00:00
Guido van Rossum c405b7b2fa Support ".pyc" files: cached compilation results.
(Similar to Emacs ".elc" files.)
1991-06-04 19:39:42 +00:00
Guido van Rossum 175a9ea8c8 Pre-define MS-DOS separator 1991-05-05 20:07:59 +00:00
Guido van Rossum 66f1fa83f1 Added forward declaration (to satisfy Standard C). 1991-04-03 19:03:52 +00:00
Guido van Rossum f70e43a073 Added copyright notice. 1991-02-19 12:39:46 +00:00
Guido van Rossum 7f133ed073 Call the init function of a built-in module here.
,
1991-02-19 12:23:57 +00:00
Guido van Rossum 3f5da24ea3 "Compiling" version 1990-12-20 15:06:42 +00:00
Guido van Rossum 3304975647 Add extra DECREF. 1990-11-18 17:36:26 +00:00
Guido van Rossum 8d15b5d036 Added reload() functionality. 1990-10-26 14:58:58 +00:00
Guido van Rossum 85a5fbbdfe Initial revision 1990-10-14 12:07:46 +00:00