Commit Graph

237 Commits

Author SHA1 Message Date
Fred Drake
1d1e1dba12 Corrected return type and value information for PyUnicode_Count() and
PyUnicode_Find().
This closes SF bug #566631.
2002-06-20 22:07:04 +00:00
Fred Drake
b084017c7a Fix documentation for PyMarshal_WriteObjectToFile() and
PyMarshal_WriteObjectToFile().
This closes SF bug #533735.
2002-06-17 15:44:18 +00:00
Fred Drake
a0c5e9fb74 Clean up descriptions of PyObject_RichCompare() and PyObject_RichCompareBool()
based on comments from David Abrahams.
Added refcount information for these functions.
2002-06-14 14:35:56 +00:00
Fred Drake
178153f8d6 Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.
2002-06-13 11:51:48 +00:00
Michael W. Hudson
5efaf7eac8 This is my nearly two year old patch
[ 400998 ] experimental support for extended slicing on lists

somewhat spruced up and better tested than it was when I wrote it.

Includes docs & tests.  The whatsnew section needs expanding, and arrays
should support extended slices -- later.
2002-06-11 10:55:12 +00:00
Guido van Rossum
9788384d02 Explain that tp_basicsize must provide alignment for the items. 2002-05-31 21:00:18 +00:00
Fred Drake
ffb294bd34 Add refcount information for PySequence_ITEM(). 2002-05-23 16:03:16 +00:00
Fred Drake
86228e4ca2 Add version annotation for PySequence_ITEM(). 2002-05-23 16:02:28 +00:00
Martin v. Löwis
01f94bda38 Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
2002-05-08 08:44:21 +00:00
Thomas Heller
541703b18f Typo: whcar_t should be wchar_t.
Bugfix candidate? Don't know how this is handled in the docs.
2002-04-29 17:28:43 +00:00
Fred Drake
432425e834 Small markup adjustments for consistency. 2002-04-29 15:17:16 +00:00
Tim Peters
5de9842b34 Repair widespread misuse of _PyString_Resize. Since it's clear people
don't understand how this function works, also beefed up the docs.  The
most common usage error is of this form (often spread out across gotos):

	if (_PyString_Resize(&s, n) < 0) {
		Py_DECREF(s);
		s = NULL;
		goto outtahere;
	}

The error is that if _PyString_Resize runs out of memory, it automatically
decrefs the input string object s (which also deallocates it, since its
refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
branch ever triggers, it's an error to call Py_DECREF(s):  s is already
NULL!  A correct way to write the above is the simpler (and intended)

	if (_PyString_Resize(&s, n) < 0)
		goto outtahere;

Bugfix candidate.
2002-04-27 18:44:32 +00:00
Thomas Heller
8da4b59221 Fix a small mistake and complete some function prototypes.
SF Patch #547813.
2002-04-24 06:35:11 +00:00
Fred Drake
b957bc3dcc Clarify the return value of PyObject_IsInstance(). 2002-04-23 18:15:44 +00:00
Fred Drake
8d95ca4469 Add text on tp_as_buffer that refers tothe section that covers the topic.
Additional material is still needed in that section.
2002-04-17 13:44:58 +00:00
Fred Drake
121460d8cb Minor wording change. 2002-04-16 18:32:37 +00:00
Fred Drake
9ad70f9cb0 Add more text from Guido on the type structure fields.
Small additional changes.
2002-04-16 16:22:24 +00:00
Fred Drake
0e0b6180ba Add documentation for PyObject_Call().
Note that PyObject_Size() is a synonym for PyObject_Length().
This closes SF patch #544330 (contributed by Thomas Heller).
2002-04-15 20:51:19 +00:00
Fred Drake
188ecd141a Integrated more text from Guido. 2002-04-15 18:44:46 +00:00
Fred Drake
4d2a95dfe7 Integrate a bunch of new text from Guido. 2002-04-12 22:47:18 +00:00
Fred Drake
f495ef7466 Warn people away from PyModule_GetDict(), but not too strongly.
(The real issue is whether modules can benefit from an alternate
implementation strategy rather than using a dictionary.  We should migrate
away from direct dictionary manipulation to allow more room for Jeremy to
flex the implementation with changes in globals lookup.)
2002-04-12 19:32:07 +00:00
Fred Drake
28de8d4b37 Add a (very) simple description of PyType_Ready(). 2002-04-12 16:15:10 +00:00
Fred Drake
e3c764b6c2 Document PyType_CheckExact(), PyType_IS_GC().
Update description of PyType_Check().
2002-04-10 17:52:52 +00:00
Fred Drake
4d61775a35 Started filling in the information about some of the basic types and macros
used to define Python objects.
2002-04-09 21:22:07 +00:00
Fred Drake
375e30225e Update to use the new \csimplemacro macro 2002-04-09 21:09:42 +00:00