Commit Graph

85 Commits

Author SHA1 Message Date
Guido van Rossum 7c14103d77 Keep gcc -Wall happy 1997-08-15 02:52:08 +00:00
Guido van Rossum d47a0a86b4 Added Jim Fulton's PyImport_Import(), which calls whatever
__import__() hook is currently installed.
1997-08-14 20:11:26 +00:00
Guido van Rossum 741689d5f3 Use string interning and caching to get speedups on the mac (Jack). 1997-08-12 14:53:39 +00:00
Guido van Rossum 085d269f1d New rules for deleting modules. Rather than having an elaborate
scheme based on object's types, have a simple two-phase scheme based
on object's *names*:

	/* To make the execution order of destructors for global
	   objects a bit more predictable, we first zap all objects
	   whose name starts with a single underscore, before we clear
	   the entire dictionary.  We zap them by replacing them with
	   None, rather than deleting them from the dictionary, to
	   avoid rehashing the dictionary (to some extent). */
1997-08-05 02:20:51 +00:00
Guido van Rossum 25ce566661 The last of the mass checkins for separate (sub)interpreters.
Everything should now work again.

See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
1997-08-02 03:10:38 +00:00
Guido van Rossum ef3d02ebb9 Removed some variables that are used to exchange data between import.c and
importdl.c: the MAXSUFFIXSIZE macro is now defined in importdl.h, and
the modules dictionary is now passed using PyImport_GetModuleDict().

Also undefine USE_SHLIB for AIX -- in AIX 4.2 and up, dlfcn.h exists
but we don't want to use it.
1997-07-21 14:54:36 +00:00
Guido van Rossum b65e85cb73 Fix problem discovered by Greg McFarlane: when an imported module
replaces its own entry in sys.module, reference count errors ensue;
even if there is no reference count problem, it would be preferable
for the import to yield the new thing in sys.modules anyway (if only
because that's what later imports will yield).  This opens the road to
an official hack to implement a __getattr__ like feature for modules:
stick an instance in sys.modules[__name__].
1997-07-10 18:00:45 +00:00
Guido van Rossum af5dfb4ceb One last rename glitch: import_modules -> _PyImport_Modules. 1997-05-14 17:36:12 +00:00
Guido van Rossum b05a5c7698 Instead of importing graminit.h whenever one of the three grammar 'root'
symbols is needed, define these in Python.h with a Py_ prefix.
1997-05-07 17:46:13 +00:00
Guido van Rossum 0bac33b420 Oops, forgot one: inittab. 1997-04-29 20:24:10 +00:00
Guido van Rossum 79f25d9a7b Quickly renamed the remaining files -- this directory is done. 1997-04-29 20:08:16 +00:00
Guido van Rossum 6bf62dad9e Keep gcc -Wall and Microsoft VC happy. 1997-04-11 20:37:35 +00:00
Guido van Rossum 0824f63cfc When -O is given, use ".pyo" instead of ".pyc". 1997-03-11 18:37:35 +00:00
Guido van Rossum 99d182550b New magin number (because of linenumber table). 1997-01-24 03:44:53 +00:00
Guido van Rossum dd5db43905 New MAGIC number (code objects have one more item when marshalled). 1997-01-17 21:06:11 +00:00
Guido van Rossum 80bb9655f0 Keep gcc -Wall happy. 1996-12-05 23:27:02 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum ac279109d4 PYTHONWIN -> MS_COREDLL 1996-08-22 23:10:58 +00:00
Guido van Rossum 1741d60725 Added casts from unsigned char to char when calling rds_object() on
frozen code.
1996-08-08 18:52:59 +00:00
Guido van Rossum 8861b74445 Changes for slice and ellipses 1996-07-30 16:49:37 +00:00
Guido van Rossum 42cd305b25 new .pyc magic number (** operator) 1996-07-21 02:28:18 +00:00
Guido van Rossum 6f489d989d Slightly different Windows ifdefs 1996-06-28 20:15:15 +00:00
Guido van Rossum 0e41c8c848 Cosmetic change to the dox_8x3 hack. 1996-06-20 14:18:34 +00:00
Guido van Rossum cfd0a22252 struct frozen is now struct _frozen and comes from import.h. 1996-06-17 17:06:34 +00:00
Guido van Rossum 40f470f7e0 moved verbose decl to pydebug.h; added dos_8x3 feature 1996-05-23 22:51:04 +00:00
Guido van Rossum 9c9a07c9c9 Remember source filename as <module>.__file__. 1996-05-16 20:43:40 +00:00
Guido van Rossum a5a3db70d4 Under NT, interface to mysterious module registry. (Mark H.) 1996-04-09 02:39:59 +00:00
Guido van Rossum be1a6e29e3 Change Mac creator from 'PYTH' to 'Pyth' -- 'PYTH' was already taken
by someone else, 'Pyth' is now officially registered by the PSA.
1996-02-21 15:29:20 +00:00
Jack Jansen 95ffa23597 Removed unused variables 1995-10-03 14:38:41 +00:00
Guido van Rossum 6ec1efb645 add imp.get_frozen_object() 1995-08-04 04:08:57 +00:00
Jack Jansen 614cf81606 Undef 'argument' before including mac headers 1995-07-28 11:28:14 +00:00
Guido van Rossum ce0a6ded4d never close the file in imp.load_... 1995-07-26 18:13:27 +00:00
Guido van Rossum 681d79aaf3 keyword arguments and faster calls 1995-07-18 14:51:37 +00:00
Guido van Rossum 7faeab3103 new MAGIC; some changes to default files for imp.load_... functions 1995-07-07 22:50:36 +00:00
Jack Jansen ae12e19409 Added PY_RESOURCE (mac only) to imp module 1995-06-18 20:06:44 +00:00
Sjoerd Mullender fbe6d33ffd Check if we've already loaded a dynamic module under a different name. 1995-06-12 15:51:34 +00:00
Guido van Rossum c388068431 magic number changes of CR/LF are swapped 1995-02-19 15:54:18 +00:00
Jack Jansen 9c96a923fb Added hooks to support importing pyc code from a resource on the mac. 1995-02-15 22:57:06 +00:00
Guido van Rossum 0b3449010e init_frozen non-static, frozenmain.c not in Makefile any more 1995-02-07 15:35:27 +00:00
Guido van Rossum 90f0e07a5b fix glaring bug in get_magic 1995-01-30 12:53:06 +00:00
Guido van Rossum 0de81bfec9 don't dictclear deleted modules in doneimport 1995-01-26 00:41:28 +00:00
Guido van Rossum 7f9fa97ca2 fix import related leaks 1995-01-20 16:53:12 +00:00
Guido van Rossum 94390ec2a6 use getbuiltins() everywhere, it defaults to getbuiltidict() 1995-01-12 11:37:57 +00:00
Guido van Rossum 6135a87f2b __builtins__ mods (and sys_checkinterval for ceval.c) 1995-01-09 17:53:26 +00:00
Guido van Rossum 6d023c98b0 Added 1995 to copyright message.
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-04 19:12:13 +00:00
Guido van Rossum 1ae940a587 Lots of changes, most minor (fatal() instead of abort(), use of
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.
1995-01-02 19:04:15 +00:00
Sjoerd Mullender 06fe7e5c2c Added comment symbols around word after #endif. 1994-12-14 15:30:04 +00:00
Guido van Rossum 6c849697fd Fix various potential buffer overrun problems. 1994-09-26 15:47:17 +00:00
Guido van Rossum fdef271550 * Import/pythonrun.h, Python/{import,pythonrun}.c,
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-14 13:31:04 +00:00
Guido van Rossum ae311bd503 Mods for HP-UX dynamic loading. 1994-09-12 10:39:56 +00:00