summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Whoops! Two stray characters crept in to my last check-inAndrew M. Kuchling2000-12-201-1/+1
|
* Patch #102955, fixing one of the warnings in bug #121479:Andrew M. Kuchling2000-12-201-5/+7
| | | | | Simplifies ord()'s logic at the cost of some code duplication, removing a " `ord' might be used uninitialized in this function" warning
* Add definitions for PySys_ResetWarnOptions() andGuido van Rossum2000-12-151-0/+39
| | | | PySys_AddWarnOption().
* Add PyErr_Warn().Guido van Rossum2000-12-151-0/+34
|
* Add definitions for standard warning category classes (PyExc_WarningGuido van Rossum2000-12-151-0/+36
| | | | etc.).
* Use c2pstr() in stead of Pstring() to convert C-strings toJack Jansen2000-12-121-3/+4
| | | | | Pascal-strings. Safer, because Pstring converts in-place and the pathname may be reused later for error messages.
* vgetargskeywords(): Patch for memory leak identified in bug #119862.Barry Warsaw2000-12-111-0/+1
|
* _getframe(): New sys module function for getting at the stack frame.Barry Warsaw2000-12-061-0/+37
| | | | | Implements and closes SF patch #102106, with Guido's suggested documentation changes.
* Make isinstance() more permissive in what types of arguments itNeil Schemenauer2000-12-041-17/+9
| | | | | accepts. Clarify exception messages for isinstance() and issubclass(). Closes bug #124106.
* Clarified some of the error messages, esp. "read-only characterGuido van Rossum2000-12-011-17/+16
| | | | buffer" replaced by "string or read-only character buffer".
* Plug a memory leak in com_import_stmt(): the tuple created to hold theGuido van Rossum2000-11-271-1/+2
| | | | | | "..." in "from M import ..." was never DECREFed. Leak reported by James Slaughter and nailed by Barry, who also provided an earlier version of this patch.
* SF bug 119622: compile errors due to redundant atof decls. I don't understandTim Peters2000-11-142-3/+0
| | | | | | the bug report (for details, look at it), but agree there's no need for Python to declare atof itself: we #include stdlib.h, and ANSI C sez atof is declared there already.
* Fix syntax error. Submitted by Bill Bumgarner. Apparently this isGuido van Rossum2000-11-131-1/+1
| | | | still in use, for Apple Mac OSX.
* Rip out DOS-8x3 support.Guido van Rossum2000-11-131-17/+2
|
* Move our own getopt() implementation to _PyOS_GetOpt(), and use itThomas Wouters2000-11-032-32/+19
| | | | | | | | | regardless of whether the system getopt() does what we want. This avoids the hassle with prototypes and externs, and the check to see if the system getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to avoid name clashes. Add new include file to define the right symbols. Fix Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on Python to provide it.
* Fix for SF bug #117241Jeremy Hylton2000-10-301-1/+15
| | | | | | | | | When a method is called with no regular arguments and * args, defer the first arg is subclass check until after the * args have been expanded. N.B. The CALL_FUNCTION implementation is getting really hairy; should review it to see if it can be simplified.
* Patch 102114, Bug 11725. On OpenBSD (but apparently not on the otherGuido van Rossum2000-10-251-2/+7
| | | | BSDs) you need a leading underscore in the dlsym() lookup name.
* Ka-Ping Yee <ping@lfw.org>:Fred Drake2000-10-244-57/+76
| | | | | | Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
* Andy Dustman <adustman@users.sourceforge.net>:Fred Drake2000-10-121-3/+0
| | | | Eliminate unused variables to appease compiler.
* Do a better job at staying on-screen :P (Sorry, it's late here.) I'mThomas Wouters2000-10-111-1/+2
| | | | | assuming here that the ANSI-C adjacent-string-concatenation technique is allowable, now that Python requires an ANSI C compiler.
* Adjust debugging code in the implementation of the DUP_TOPX bytecode, useThomas Wouters2000-10-111-5/+1
| | | | | Py_FatalError() instead, and clarify the message somewhat. As discussed on python-dev.
* Remove the last gcc -Wall warning about possible use of an uninitializedFred Drake2000-10-111-0/+1
| | | | | | variable. w should be initialized before entering the bytecode interpretation loop since we only need one initialization to satisfy the compiler.
* Attempt to fix bogus gcc -Wall warnings reported by Marc-Andre Lemburg,Tim Peters2000-10-111-31/+61
| | | | | | by making the DUP_TOPX code utterly straightforward. This also gets rid of all normal-case internal DUP_TOPX if/branches, and allows replacing one POP() with TOP() in each case, so is a good idea regardless.
* Avoid a couple of "value computed is not used" warnings from gcc -Wall;Fred Drake2000-10-101-2/+2
| | | | | | | these computations are required for their side effects in traversing the variable arguments list. Reported by Marc-Andre Lemburg <mal@lemburg.com>.
* Donn Cave <donn@u.washington.edu>:Fred Drake2000-10-061-1/+1
| | | | | | | | Do not assume that all platforms using a MetroWorks compiler can use POSIX threads; the assumption breaks on BeOS. This fix only helps for BeOS. This closes SourceForge patch #101772.
* SF "bug" 115973: patches from Norman Vine so that shared libraries andTim Peters2000-10-051-0/+5
| | | | Tkinter work under Cygwin. Accepted on faith & reasonableness.
* Detect conflicting Python DLL on module import under Windows - as per [ ↵Mark Hammond2000-10-051-1/+152
| | | | Patch #101676 ]
* _PyImport_Fini(): Closed small memory leak when an embedded app callsBarry Warsaw2000-10-031-0/+2
| | | | | Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to be deallocated. Partial closure of SF #110681, Jitterbug PR#398.
* The 2.0b2 change to write .pyc files in exclusive mode (if possible)Tim Peters2000-09-291-1/+6
| | | | | | | | unintentionally caused them to get written in text mode under Windows. As a result, when .pyc files were later read-- in binary mode --the magic number was always wrong (note that .pyc magic numbers deliberately include \r and \n characters, so this was "good" breakage, 100% across all .pyc files, not random corruption in a subset). Fixed that.
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-266-24/+0
| | | | | | | | Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
* Andrew Kuchling <akuchlin@mems-exchange.org>:Fred Drake2000-09-231-0/+27
| | | | | | | Add three new convenience functions to the PyModule_*() family: PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant(). This closes SourceForge patch #101233.
* Special case the "s#" PyArg_Parse() token for Unicode objects:Marc-André Lemburg2000-09-211-26/+53
| | | | | | | | | | | | "s#" will now return a pointer to the default encoded string data of the Unicode object instead of a pointer to the raw UTF-16 data. The latter is still available via PyObject_AsReadBuffer(). The patch also adds an optimization for string objects which is based on the fact that string objects return the raw character data for getreadbuffer access and are always single-segment.
* On Unix, use O_EXCL when creating the .pyc/.pyo files, to avoid a race conditionGuido van Rossum2000-09-201-1/+31
|
* This patch adds a new Python C API called PyString_AsStringAndSize()Marc-André Lemburg2000-09-192-12/+7
| | | | | | | | | | | | | which implements the automatic conversion from Unicode to a string object using the default encoding. The new API is then put to use to have eval() and exec accept Unicode objects as code parameter. This closes bugs #110924 and #113890. As side-effect, the traditional C APIs PyString_Size() and PyString_AsString() will also accept Unicode objects as parameters.
* Obscure marshal fixes:Tim Peters2000-09-191-4/+4
| | | | | | | | When reading a short, sign-extend on platforms where shorts are bigger than 16 bits. When reading a long, repair the unportable sign extension that was being done for 64-bit machines (it assumed that signed right shift sign-extends).
* Make better use of GNU Pth -- patch by Andy Dustman.Guido van Rossum2000-09-191-3/+4
| | | | | | | | | | | | | | | I can't test this, so I'm just checking it in with blind faith in Andy. I've tested that it doesn't broeak a non-Pth build on Linux. Changes include: - There's a --with-pth configure option. - Instead of _GNU_PTH, we test for HAVE_PTH. - Better signal handling. - (The config.h.in file is regenerated in a slightly different order.)
* Deferred the attribute name object type checking to the underlyingMarc-André Lemburg2000-09-181-4/+4
| | | | | | PyObject_Set/GetAttr() calls. This patch fixes bug #113829.
* Add PyOS_getsig() and PyOS_setsig() -- wrappers around signal() orGuido van Rossum2000-09-161-0/+34
| | | | sigaction() (if HAVE_SIGACTION is defined).
* Added B format char to Py_BuildValue (same as b,h,i, but makesJack Jansen2000-09-151-1/+1
| | | | bgen-generated code work).
* Cast UCHAR_MAX to int before doing the comparison for overflow of theJack Jansen2000-09-151-0/+1
| | | | B format char.
* com_continue_stmt(): Improve error message when continue is foundFred Drake2000-09-081-1/+22
| | | | | | in a try statement in a loop. This is related to SourceForge bug #110830.
* This patch hopefully fixes the problem with "es#" and "es" inMarc-André Lemburg2000-09-081-0/+2
| | | | PyArg_ParseTupleAndKeywords() and closes bug #113807.
* The GCC version is loooooooooong; put it on a new line.Guido van Rossum2000-09-051-1/+1
|
* All right. More uniformity, and extra blank lines.Guido van Rossum2000-09-041-1/+4
|
* Use periods, not semicolons between Copyright and All Rights Reserved.Guido van Rossum2000-09-041-3/+3
|
* Fix the char* vs. const char* mismatch for the argument of aix_loaderror()Vladimir Marangozov2000-09-041-1/+1
|
* Change the copyright notice according to CNRI's wishes, withGuido van Rossum2000-09-031-2/+5
| | | | | | | BeOpen.com added to the front. (Even if maybe we won't print this long banner at startup, the string must still be defined for sys.copyright.)
* changed \x to consume exactly two hex digits. implements PEP-223Fredrik Lundh2000-09-021-16/+28
| | | | for 8-bit strings.
* PyInterpreterState_New is not thread-safe, and the recent fix to _PyPcloseTim Peters2000-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | can cause it to get called by multiple threads simultaneously. Ditto for PyInterpreterState_Delete. Of the former, the docs say "The interpreter lock need not be held, but may be held if it is necessary to serialize calls to this function". This kinda implies it both is and isn't thread-safe. Of the latter, the docs merely say "The interpreter lock need not be held.", and the clause about serializing is absent. I expect it was *believed* these are both thread-safe, and the bit about serializing via the global lock was meant as a permission rather than a caution. I also expect we've never seen a problem here because the Python core (prior to the _PyPclose fix) only calls these functions once per run. The Py_NewInterpreter subsystem exposed by the C API (but not used by Python itself) also calls them, but that subsystem appears to be very rarely used. Whatever, they're both thread-safe now.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-0151-475/+0
| | | | This should match the situation in the 1.6b1 tree.