228 Commits

Author SHA1 Message Date
Andrew MacIntyre
775499689e backport of concrete.tex v1.35:
The semantics of PyList_Check() and PyDict_Check() changed at 2.2, along
with most other concrete object checks, but the docs weren't brought into
line.

PyList_CheckExact() was added at 2.2 but never documented.
2003-12-26 00:00:29 +00:00
Raymond Hettinger
b4d53fda5b As discussed on python-dev, revised docs to note that
PyObject_IsTrue() can have an error result.

Also, added missing docs for PyObject_Not().
2003-04-16 17:30:15 +00:00
Fred Drake
273888e56c Backport comments about PyObject_Type() (HEAD revisions 1.24, 1.25). 2003-04-09 18:17:18 +00:00
Neal Norwitz
a9cbb794c9 Backport:
date: 2002/12/06 22:42:13;  author: theller;

Typo: propogate -> propagate
2003-02-02 19:06:04 +00:00
Walter Dörwald
80ccaac24d Backport version 1.21:
Document that the second argument to PyObject_IsInstance
may be a tuple. This closes SF patch
http://www.python.org/sf/649095
2002-12-06 10:17:35 +00:00
Fred Drake
034340eb35 Clarify that PyImport_AddModule() and PyImport_ExecCodeModule() don't
add any package support structure even if a dotted-name is passed for
the module.
Closes SF bug #424106.
2002-11-13 15:15:11 +00:00
Fred Drake
8357673053 Minor cleanups, markup. 2002-11-05 22:19:27 +00:00
Neal Norwitz
7d0ee19911 Fix SF # 518775, buffer object API description truncated 2002-11-03 02:57:24 +00:00
Fred Drake
78b1c187ab Correct the description of PyErr_Restore().
Closes SF bug #577000.
2002-10-24 20:55:07 +00:00
Fred Drake
53c20b4a51 Clarified the error cases and Unicode handling of PyString_AsString(),
PyString_AsStringAndSize(), and PyString_AS_STRING().
Closes SF bug #606463.
2002-10-22 20:21:06 +00:00
Fred Drake
d967ba542a Added refcount information for PyObject_GetIter(). 2002-10-04 18:59:36 +00:00
Fred Drake
74f1f76ef1 Ok, read the source this time: PyErr_SetObject() does not steal a reference. 2002-09-25 02:33:47 +00:00
Fred Drake
1884af0643 Clarify documentation for PyErr_SetObject() to describe the reference
count behavior.
2002-09-24 16:44:56 +00:00
Raymond Hettinger
eb2823f894 Fix API typo. Closes SF 606216 2002-09-08 04:42:16 +00:00
Neal Norwitz
6fa4aec300 Fix SF bug 587012, doc mentions inexistent builtin unistr 2002-07-28 13:56:20 +00:00
Fred Drake
84dacffe6f Corrected return type and value information for PyUnicode_Count() and
PyUnicode_Find().
This closes SF bug #566631.
2002-06-20 22:09:12 +00:00
Fred Drake
70e87422b8 Fix documentation for PyMarshal_WriteObjectToFile() and
PyMarshal_WriteObjectToFile().
This closes SF bug #533735.
2002-06-17 15:45:21 +00:00
Fred Drake
53c47ac96e 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:36:23 +00:00
Fred Drake
4ffb172498 Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.
2002-06-13 11:53:54 +00:00
Anthony Baxter
43eb1d3ad3 backport theller's patch:
Typo: whcar_t should be wchar_t.

Bugfix candidate? Don't know how this is handled in the docs.

Original patch(es):
python/dist/src/Doc/api/concrete.tex:1.15
2002-04-30 04:07:57 +00:00
Anthony Baxter
608ee5a828 backport tim_one's patch:
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.

Original patch(es):
python/dist/src/Doc/api/concrete.tex:1.13
2002-04-30 03:24:12 +00:00
Fred Drake
7addee3ab4 Document PyType_CheckExact(), PyType_IS_GC().
Update description of PyType_Check().
2002-04-10 18:00:44 +00:00
Fred Drake
cd1ec596ea Correct the descriptions of the PyObject_As*Buffer() return values.
This closes SF bug #539081.
2002-04-04 04:11:48 +00:00
Fred Drake
409bb439ed Backport Skip's patch for SF bug #534495:
exceptions.tex 1.5

fix a typo in PyErr_Format table and add row for 'p' format char
closes bug 534495
2002-03-27 14:08:21 +00:00
Fred Drake
804fea92fd Add a note that Py_None needs the same reference count treatment as any
other PyObject *.
This closes SF bug #494007.
2002-03-12 20:18:01 +00:00