Commit Graph

347 Commits

Author SHA1 Message Date
Guido van Rossum
b4cfdfa077 Removed special Windows defines, at Mark Hammond's request. 1997-09-29 23:29:08 +00:00
Guido van Rossum
2d2c34445b New API PyErr_NewException(name, base, dict) to create simple new exceptions. 1997-09-16 21:50:37 +00:00
Barry Warsaw
65349a3936 [Py_Exc]NumberError => [Py_Exc]ArithmeticError 1997-09-16 21:50:36 +00:00
Guido van Rossum
0474832d9c Introduce PyExc_Exception as the conceptual root class for all exceptions. 1997-09-16 18:43:15 +00:00
Guido van Rossum
7ca65abb2f Set it to 1.5a4, now we have dotted-name import... 1997-09-08 02:17:31 +00:00
Guido van Rossum
114c1eabbb #Added prototype for PyObject_HasAttr() -- must've been an oversight. 1997-09-06 18:44:59 +00:00
Fred Drake
49bb0e32a0 Fix in trailing comment: PyDict_SetItemString() does *not* consume a reference
count, PyList_SetItem() does.  Very confusing!
1997-09-05 17:53:53 +00:00
Guido van Rossum
026de19906 Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
is like PyImport_ImporModule(name) but receives the globals and locals
dict and the fromlist arguments as well.  (The name is a char*; the
others are PyObject*s).
1997-09-05 07:11:32 +00:00
Guido van Rossum
d7ed683a7e Inline PyObject_CallObject (Marc-Andre Lemburg). 1997-08-30 15:02:50 +00:00
Guido van Rossum
3d90af967d Added NoSite flag. 1997-08-29 22:34:00 +00:00
Barry Warsaw
d5a0ff972d Added extern definition for -X flag variable. 1997-08-29 22:01:11 +00:00
Barry Warsaw
0596c2ac28 Declarations for two phase initialization and finalization functions
for the built-in module.
1997-08-29 21:57:07 +00:00
Barry Warsaw
392d8272bf Added externs for three new exceptions PyExc_StandardError,
PyExc_NumberError, and PyExc_LookupError.  Also added extern for
pre-instantiated exception instance PyExc_MemoryErrorInst.

Removed extern of obsolete exception PyExc_AccessError.
1997-08-29 21:56:07 +00:00
Barry Warsaw
c0dc92af7d Three new C API functions:
- int PyErr_GivenExceptionMatches(obj1, obj2)

  Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
  instance of type obj2, or of a class derived from obj2

- int PyErr_ExceptionMatches(obj)

  Higher level wrapper around PyErr_GivenExceptionMatches() which uses
  PyErr_Occurred() as obj1.  This will be the more commonly called
  function.

- void PyErr_NormalizeException(typeptr, valptr, tbptr)

  Normalizes exceptions, and places the normalized values in the
  arguments.  If type is not a class, this does nothing.  If type is a
  class, then it makes sure that value is an instance of the class by:

  1. if instance is of the type, or a class derived from type, it does
     nothing.

  2. otherwise it instantiates the class, using the value as an
     argument.  If value is None, it uses an empty arg tuple, and if
     the value is a tuple, it uses just that.
1997-08-22 21:22:58 +00:00
Guido van Rossum
e3c0d5eb34 Added new Py_IsInitalized() API function to test the 'initialized' flag. 1997-08-22 04:20:13 +00:00
Guido van Rossum
ab589b945e Completely disable the declarations for malloc() and friends. Use
#ifdef though, so if you still need these for a really backwards
compiler you know what to do.
1997-08-21 16:13:37 +00:00
Guido van Rossum
ef3138f9ad Moved assert.h to ../Parser directory 1997-08-19 12:07:22 +00:00
Guido van Rossum
9faabb8d23 Added prototype for PyImport_Import(). 1997-08-14 19:52:09 +00:00
Guido van Rossum
142eeb8339 cPickle release 0.3 from Jim Fulton 1997-08-13 03:14:41 +00:00
Guido van Rossum
3fb1aea0ae Added decls for stuff from myreadline. 1997-08-12 15:14:22 +00:00
Guido van Rossum
8e5e4461a8 Added prototype for various finalizers. 1997-08-12 14:57:21 +00:00
Guido van Rossum
bb301c53ed Added prototype for PyGrammar_RemoveAccelerators(). 1997-08-12 14:57:08 +00:00
Guido van Rossum
15974ad5e6 Bump MS_DLL_ID to 1.5.0. 1997-08-12 14:48:03 +00:00
Guido van Rossum
1d529d1ecd Add a cast to the call to _Py_Dealloc in the expanded version of
Py_DECREF, to reduce the warnings when compiling with reference count
debugging on.  (There are still warnings for each call to
_Py_NewReference -- too bad.)
1997-08-05 02:30:44 +00:00
Guido van Rossum
d085e88d3c Added Py_Malloc and friends as well as PyMem_Malloc and friends. 1997-08-05 01:59:22 +00:00