summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Jim Fulton writes:Guido van Rossum1998-10-221-0/+1
| | | | | | | | """ I had originally not realized that PyEval_GetGlobals did not INCREF it's return value. The fix is to add the INCREF, as shown below. """
* When errno is zero, avoid calling strerror() and use "Error" for theGuido van Rossum1998-10-141-2/+7
| | | | message.
* Replace fprintf(stderr, ...) with PySys_WriteStderr(...).Guido van Rossum1998-10-122-23/+23
|
* Patches for mywrite() by Marc Lemburg: save/restore the error stateGuido van Rossum1998-10-121-3/+6
| | | | reliably; check return value of vsprintf().
* Implement new format character 't#'. This is like s#, accepting anGuido van Rossum1998-10-081-0/+25
| | | | | object that implements the buffer interface, but requires a buffer that contains 8-bit character data. Greg Stein.
* The previous checkin contained an experiment of Greg Stein's that wasn'tGuido van Rossum1998-10-081-1/+1
| | | | meant for checkin, and which broke marshal.loads().
* On Win32, useGuido van Rossum1998-10-081-1/+4
| | | | | LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) to search dependent DLLs in the directory of the pathname.
* Changes to deal with the sigcheck+intrcheck vs. signalmodule controversy.Guido van Rossum1998-10-071-3/+7
|
* Changes to support other object types besides stringsGuido van Rossum1998-10-073-13/+40
| | | | | as the code string of code objects, as long as they support the (readonly) buffer interface. By Greg Stein.
* BSDI specific patches, inspired by Nigel Head and otto@mail.olympus.net.Guido van Rossum1998-10-071-1/+22
| | | | | | | | | | | Also (non-BSDI specific): - Change the CHECK_STATUS() macro so it tests for nonzero error codes instead of negative error codes only (this was needed for BSDI, but appears to be correct according to the PTHREADS spec). - use memset() to zero out the allocated lock structure. Again, this was needed for BSDI, but can't hurt elsewhere either.
* Support PYTHONOPTIMIZE variable; by Marc Lemburg.Guido van Rossum1998-10-071-0/+2
|
* Eh, better error message for the previous change. It now saysGuido van Rossum1998-10-021-1/+1
| | | | "non-default argument follows default argument".
* Treat def f(a, b=1, c): ... as an error (missing default for c)Guido van Rossum1998-10-021-7/+4
| | | | instead of silently supplying a default of None fore c.
* Renamed thread.h to pythread.h.Guido van Rossum1998-10-011-15/+15
| | | | (Also removed whitespace after # in some BEOS related cpp directives.)
* Renamed thread.h to pythread.h.Guido van Rossum1998-10-014-4/+4
|
* On second though, NEXITFUNCS should be defined here and not inGuido van Rossum1998-10-011-1/+1
| | | | | pystate.h; pystate.h doesn't use it (I thought I wanted to move the array there but that won't work).
* builtin_apply(): Second argument type check is relaxed to allow any sequence.Barry Warsaw1998-10-011-6/+18
|
* While scalling sys.modules, skip entries that don't have string keys,Guido van Rossum1998-10-011-4/+4
| | | | | to protect us from jokers who put items with non-string keys in sys.modules. Reported by Greg Stein.
* In FreeBSD when using ELF, an underscore is needed in front of theGuido van Rossum1998-09-301-1/+1
| | | | function name. (Vladimir Kushnir by way of Thomas Gellekum.)
* Remove redundant definition of NEXITFUNCS.Guido van Rossum1998-09-281-1/+1
| | | | (Reported by Jeff Rush.)
* Several changes that Python carry on in the face of errors in theBarry Warsaw1998-09-141-26/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization of class exceptions. Specifically: init_class_exc(): This function now returns an integer status of the class exception initialization. No fatal errors in this method now. Also, use PySys_WriteStderr() when writing error messages. When an error occurs in this function, 0 is returned, but the partial creation of the exception classes is not undone (this happens elsewhere). Things that could trigger the fallback: - exceptions.py fails to be imported (due to syntax error, etc.) - one of the exception classes is missing (e.g. due to library version mismatch) - exception class can't be inserted into __builtin__'s dictionary - MemoryError instance can't be pre-allocated - some other PyErr_Occurred newstdexception(): Changed the error message. This is still a fatal error because if the string based exceptions can't be created, we really can't continue. initerrors(): Be sure to xdecref the .exc field, which might be non-NULL if class exceptions init was aborted. _PyBuiltin_Init_2(): If class exception init fails, print a warning message and reinstate the string based exceptions.
* Mac-specific mod to enable aliases on import paths.Guido van Rossum1998-09-142-9/+35
| | | | (Jack Jansen and/or Just van Rossum)
* Apparently on AIX when using gcc you need to call pthread_init()Guido van Rossum1998-09-101-0/+3
| | | | | (which is not a POSIX threads call!). Reported and confirmed by Brad Howes.
* Correct typo in #ifdef: PY_THREAD_D4, should be PY_PTHREAD_D4.Guido van Rossum1998-09-041-1/+1
| | | | Reported by Jonathan Giddy.
* Should no longer surround PyOS_Readline() call withGuido van Rossum1998-09-031-4/+0
| | | | | Py_{BEGIN,END}_ALLOW_THREADS macros. Also get rid of the declaration for it (it's now in pythonrun.h).
* Add a 'volatile' to the declaration of threadid in get_thread_ident().Guido van Rossum1998-08-271-1/+1
| | | | | According to Vladimir Marangozov, this is necessary for AIX, where high optimization levels inline this function and then get it wrong :-(
* Don't release the interpreter lock around PyParser_ParseFile().Guido van Rossum1998-08-271-4/+0
| | | | It is needed so that tokenizer.c can use PySys_WriteStderr().
* __file__ used to be always set to the .pyc (or .pyo) file, even ifGuido van Rossum1998-08-251-1/+2
| | | | | | | that file in fact did not exist or at least was not used. Change this so that __file__ is *only* set to the .pyc/.pyo file when it actually read the code object from it; otherwise __file__ is set to the .py file.
* Comment out the print statement about underflow. (This only seems toGuido van Rossum1998-08-251-2/+2
| | | | | | | | happen when you use a non-keyword argument after a keyword argument, and in this case you also get a syntax error. I fully suspect that the underflow is caused by the code that stops generating code when it detects the syntax error, but I can't find the culprit right now. I know, I know.)
* Add the type of the object to the error message about calling a non-function.Guido van Rossum1998-08-251-3/+5
|
* Restructure the file so that it is never empty. No longer needsGuido van Rossum1998-08-251-10/+10
| | | | Metrowerks specific #ifdef.
* Patch by Mark Hammond to support 64-bit ints on MS platforms.Guido van Rossum1998-08-252-7/+7
| | | | | | The MS compiler doesn't call it 'long long', it uses __int64, so a new #define, LONG_LONG, has been added and all occurrences of 'long long' are replaced with it.
* Ted Horst writes in psa-members@python.org:Guido van Rossum1998-08-241-0/+41
| | | | | | This is a patch that Bill Bummgarner did for 1.4 that hasn't made its way into the distribution yet. This is important if you want to use the ObjC module.
* Add DebugBreak() call to Py_FatalError() for Mark Hammond (only onGuido van Rossum1998-08-131-0/+3
| | | | Win32 in Debug mode).
* Patch by Just van Rossum that changes how we search for submodules ofGuido van Rossum1998-08-111-19/+20
| | | | | | | frozen packages. (I *think* this means that we can now have a built-in module bar that's a submodule of a frozen package foo, by registering the built-in module with a name "foo.bar" in the table of builtin modules.)
* # Fix strange type (methonname instead of methodname).Guido van Rossum1998-08-081-4/+4
|
* Added declarations for Mac code resource modules (Jack Jansen).Guido van Rossum1998-08-061-1/+2
|
* Added handling for Mac code resource modules (Jack Jansen).Guido van Rossum1998-08-061-0/+10
|
* Gack. The module doc string is too long for VC++ 5.0.Guido van Rossum1998-08-061-2/+5
| | | | | However two string literals concatenated are fine! Hope this doesn't break other platforms.
* Make getversion.o dependent on ../Include/patchlevel.h as well.Fred Drake1998-08-051-1/+1
|
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-047-1/+331
|
* In BUILD_LIST, use PyList_SET_ITEM() instead of PyList_SetItem(); andGuido van Rossum1998-08-041-3/+1
| | | | get rid of redundant error check.
* PyErr_SetFromErrnoWithFilename(): New function which supports settingBarry Warsaw1998-07-231-2/+14
| | | | | | | | | | | an exception from errno, with a supplied filename (primarily used by IOError and OSError). If class exceptions are used then the exception is instantiated with a 3-tuple: (errno, strerror, filename). For backwards compatibility reasons, if string exceptions are used, filename is ignored. PyErr_SetFromErrno(): Implement in terms of PyErr_SetFromErrnoWithFilename().
* Added support for two new standard errors: EnvironmentError andBarry Warsaw1998-07-231-5/+16
| | | | | | | | | OSError. The EnvironmentError serves primarily as the (common implementation) base class for IOError and OSError. OSError is used by posixmodule.c Also added tuple definition of EnvironmentError when using string based exceptions.
* Small changes to map() and filter():Guido van Rossum1998-07-101-5/+8
| | | | | | | (1) If a sequence S is shorter than len(S) indicated, don't fail -- just use the shorter size. (I.e, len(S) is just a hint.) (2) Implement the special case map(None, S) as list(S) -- it's faster.
* # In case BINARY_SUBSCR, use proper PyList_GET* macros instead of inlining.Guido van Rossum1998-07-081-3/+3
|
* Marc-Andre Lemburg's patch to support instance methods with otherGuido van Rossum1998-07-081-0/+5
| | | | callable objects than regular Pythonm functions as their im_func.
* Reindented some OS/2 and hpux code that looked ugly or at leastGuido van Rossum1998-07-081-29/+28
| | | | inconsistent.
* Two error messages still used the old name of the functio mkvalue() --Guido van Rossum1998-07-071-2/+2
| | | | which is now Py_BuildValue().
* Sigh. The hack to enable special treatment for errno on SGI machinesGuido van Rossum1998-07-071-0/+4
| | | | | | | | | must be enabled here, otherwise the errno we set on overflows is not the errno that's being read by compile.c. Wonder how many other files that do their own "#include config.h" need this too :-( (Because of the structure of autoconf, it's not so simple to get this into config.h...)