summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Guido pointed out that all names in the sys module have no underscore,Fred Drake2000-08-151-4/+5
|
* Fix the parent of WindowsError - both the comments in this source file, and ↵Mark Hammond2000-08-151-1/+1
| | | | the previous exceptions.py have WindowsError as a sub-class of OSError.
* The attempt to protect against MS_WIN16 compilers that do not support longFred Drake2000-08-141-1/+2
| | | | | | string literals has not been tested on an MS_WIN16 platform; the trailing ";" was inside the #ifndef MS_WIN16, which should cause an error (missing semi-colon) when compiled with that symbol #defined.
* Add a byte_order value to the sys module. The value is "big" forFred Drake2000-08-141-0/+13
| | | | big-endian machines and "little" for little-endian machines.
* The list comp patch checked for the second child node of the 'listmaker'Thomas Wouters2000-08-131-1/+1
| | | | | node, without checking if the node actually had more than one child. It can have only one node, though: '[' test ']'. This fixes it.
* The list comprehensions patch partly reversed the removal of UNPACK_LIST,Thomas Wouters2000-08-121-13/+0
| | | | re-introducing com_assign_list, now unused. Removed it.
* Clean up a couple of warnings on Win64. The downcast of the strlen size_tTrent Mick2000-08-121-1/+1
| | | | | return value to int is safe here because in each case it previouls checked that there will be no overflow.
* list comprehensions. seeSkip Montanaro2000-08-122-215/+425
| | | | | | http://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470 for details.
* Merge UNPACK_LIST and UNPACK_TUPLE into a single UNPACK_SEQUENCE, since theyThomas Wouters2000-08-113-21/+7
| | | | | | | did the same anyway. I'm not sure what to do with Tools/compiler/compiler/* -- that isn't part of distutils, is it ? Should it try to be compatible with old bytecode version ?
* -- from Trent Mick: [Patch #101010] replace use of INT_PTRFredrik Lundh2000-08-071-5/+1
| | | | with uintptr_t (fix MSVC 5.0 build)
* When returning an error from jcompile() (which is passed through byGuido van Rossum2000-08-071-0/+8
| | | | | PyNode_Compile()), make sure that an exception is actually set -- otherwise someone stomped on our error. [2.0 checkin of this fix.]
* Avoid dumping core when PyErr_NormalizeException() is called withoutGuido van Rossum2000-08-071-0/+6
| | | | an exception set. This shouldn't happen, but we see it at times...
* Initialized opcode and oparg to silence a gcc -Wall warning.Moshe Zadka2000-08-071-2/+2
|
* Fix some strange indentation and grammar that have been bugging me forThomas Wouters2000-08-051-6/+5
| | | | weeks.
* Changed H specifier to mean "bitfield", i.e. any value fromJack Jansen2000-08-051-5/+27
| | | | | | -32768..65535 is acceptable. Added B specifier (with values from -128..255). No L added (which would have completed the set) because l already accepts any value (and the letter L is taken for quadwords).
* Removing warnings by gcc -Wall -- cast ugly || to void.Moshe Zadka2000-08-041-1/+1
|
* Add a test that Py_IsInitialized() in Py_InitModule4(). SeeGuido van Rossum2000-08-041-0/+2
| | | | | | | python-dev discussion. This should catch future version incompatibilities on Windows. Alas, this doesn't help for 1.5 vs. 1.6; but it will help for 1.6 vs. 2.0.
* This patch finalizes the move from UTF-8 to a default encoding inMarc-André Lemburg2000-08-031-4/+6
| | | | | | | | | | | | | | | | | | the Python Unicode implementation. The internal buffer used for implementing the buffer protocol is renamed to defenc to make this change visible. It now holds the default encoded version of the Unicode object and is calculated on demand (NULL otherwise). Since the default encoding defaults to ASCII, this will mean that Unicode objects which hold non-ASCII characters will no longer work on C APIs using the "s" or "t" parser markers. C APIs must now explicitly provide Unicode support via the "u", "U" or "es"/"es#" parser markers in order to work with non-ASCII Unicode strings. (Note: this patch will also have to be applied to the 1.6 branch of the CVS tree.)
* Changing the CNRI copyright notice according to CNRI's instructions.Guido van Rossum2000-08-031-1/+1
| | | | | This is a notice without a date, which apparently is not a claim to copyright but only advice to the reader. IANAL. :-)
* Both PEP 201 Lockstep Iteration and SF patch #101030 have beenBarry Warsaw2000-08-031-0/+56
| | | | | | | | | | | accepted by the BDFL. builtin_zip(): New function to implement the zip() function described in the above proposal. zip_doc[]: Docstring for zip(). builtin_methods[]: added entry for zip()
* Include the dependence of sysmodule on the patchlevel.h include, soFred Drake2000-08-011-1/+1
| | | | that sys.version_info will be built properly.
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-313-5/+2
| | | | marked my*.h as obsolete
* Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters2000-07-251-5/+5
| | | | Leave the actual #define in for API compatibility.
* Create a new section of pyport.h to hold all external function declarationsThomas Wouters2000-07-241-1/+0
| | | | | | | | | | | | | | for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though.
* Prototype yet another forward declaration.Thomas Wouters2000-07-241-1/+1
|
* Another missed ansification.Thomas Wouters2000-07-231-4/+1
|
* Included assert.h in Python.h -- it's absurd that this basic tool ofTim Peters2000-07-231-1/+1
| | | | | | | | good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro.
* -- changed w_more to take an integer instead of a charFredrik Lundh2000-07-231-2/+2
| | | | (this is what the callers expect).
* Oops. One of last nights ANSIfication patches accidentily upped the bytecodeThomas Wouters2000-07-231-1/+1
| | | | | | MAGIC number. When updating it next time, be sure it's higher than 50715 * constants. (Shouldn't be a problem if everyone keeps to the proper algorithm.)
* ANSIfy as many declarations as possible.Thomas Wouters2000-07-225-7/+8
|
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-2245-1526/+704
| | | | declarations yet, those come later.
* Fix two instances of empty argument lists, and fix styleThomas Wouters2000-07-221-79/+78
| | | | ('PyObject** x' -> 'PyObject **x')
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-1610-11/+11
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* just fixing the indentationPeter Schneider-Kamp2000-07-131-1/+1
|
* raise error on duplicate function argumentsPeter Schneider-Kamp2000-07-131-1/+10
| | | | | | | | example: >>> def f(a,a):print a ... SyntaxError: duplicate argument in function definition
* delete obsolete SYMANTEC__CFM68K__ #ifdefsSkip Montanaro2000-07-122-8/+0
|
* replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton2000-07-123-10/+11
|
* Worm around MSVC6 error on single string literal > 2Kb.Tim Peters2000-07-121-2/+7
|
* Include macglue.h for some function prototypes, and renamed a fewJack Jansen2000-07-113-3/+10
| | | | mac-specific functions to have a PyMac_ name.
* Create two new exceptions: IndentationError and TabError. These areFred Drake2000-07-112-4/+42
| | | | | | | used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
* Exception__str__(): In case 1, be sure to decref the tmp localBarry Warsaw2000-07-091-4/+8
| | | | | variable. This crushes another memory leak. Slight rewrite included.
* EnvironmentError__init__(): The two case clauses were missingBarry Warsaw2000-07-091-3/+9
| | | | | | | | `break's. This first missing break caused a memory leak when case 3 fell through case 2 in the following example: import os os.chmod('/missing', 0600)
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-0911-135/+126
|
* Get rid of unused vars in builtin_unicode (they were causingTim Peters2000-07-091-2/+0
| | | | legit warnings).
* Fixed unicode() to use the new API PyUnicode_FromEncodedObject().Marc-André Lemburg2000-07-071-14/+1
| | | | | | | This adds support for instance to the constructor (instances have to define __str__ and can return Unicode objects via that hook; string return values are decoded into Unicode using the current default encoding).
* Added support for H (unsigned short) specifier in PyArg_ParseTuple andJack Jansen2000-07-062-1/+30
| | | | Py_BuildValue.
* Include limits.h if we have it.Jack Jansen2000-07-034-0/+12
|
* init_exceptions(): Decref `doc' so it doesn't leak.Barry Warsaw2000-07-011-0/+1
|
* Jack Jansen, Mac patch:Guido van Rossum2000-07-011-0/+3
| | | | Include limits.h if we have it.
* Jack Jansen, Mac patch:Guido van Rossum2000-07-011-0/+6
| | | | If we have stat.h include it if we don't have sys/stat.h