Commit Graph

209 Commits

Author SHA1 Message Date
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
Fred Drake
8a944345ce Documentation for PyObject_GetIter(), contributed by Greg Chapman
(with only minor changes by Fred).
This closes SF bug #498607.
2002-03-11 19:01:58 +00:00
Fred Drake
2d677d29e2 Correct the refcount information for the PyWeakref_GetObject() function.
This closes SF bug #520087.
2002-02-20 05:08:02 +00:00
Fred Drake
7b52ef2d3c Close an improperly-closed verbatim environment.
This closes SF patch #496215.

Add a little more detail to the example that had not been closed.
2001-12-28 04:30:38 +00:00
Fred Drake
54e6294197 A number of small adjustments. 2001-12-11 19:40:16 +00:00
Tim Peters
f582b82fe9 SF bug #491415 PyDict_UpdateFromSeq2() unused
PyDict_UpdateFromSeq2():  removed it.
PyDict_MergeFromSeq2():  made it public and documented it.
PyDict_Merge() docs:  updated to reveal <wink> that the second
argument can be any mapping object.
2001-12-11 18:51:08 +00:00
Fred Drake
32a3587345 Document that PyString_FromString() cannot take NULL as a parameter.
This closes SF bug #489872.
2001-12-06 20:38:15 +00:00
Fred Drake
551ffae30c Clarify that the Python runtime may behave mysteriously when an exception
is not handled properly.
This closes SF bug #485153.
2001-12-03 17:56:09 +00:00
Fred Drake
3570551d6f Remove most references to __members__ and __methods__, leaving only one pair
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420.
2001-12-03 17:32:27 +00:00
Fred Drake
f07125ee53 PyErr_Format() does not return a new reference; it always returns NULL.
This closes SF bug #488387.
2001-12-03 16:36:43 +00:00
Fred Drake
454af89712 Update the signature of PyFile_WriteString(). 2001-11-29 22:42:59 +00:00
Fred Drake
c37b65ee10 Clean up some markup cruft. A number of the macros that take no
parameters (like \UNIX) are commonly entered using an empty group to
separate the markup from a following inter-word space; this is not
needed when the next character is punctuation, or the markup is the
last thing in the enclosing group.  These cases were marked
inconsistently; the empty group is now *only* used when needed.
2001-11-28 07:26:15 +00:00
Fred Drake
cd8474e6a2 Add documentation for the PyCell* APIs. 2001-11-26 21:29:17 +00:00
Fred Drake
50ecc15d05 Add omitted word for clarity. 2001-11-17 06:39:18 +00:00
Thomas Heller
bfeeeee851 Fix obvious typos. 2001-11-12 07:46:31 +00:00
Fred Drake
94ead57dc3 Added version annotations, remove hard tabs. 2001-11-09 23:34:26 +00:00
Jeremy Hylton
89c3a22a27 Add PyObject_CheckReadBuffer(), which returns true if its argument
supports the single-segment readable buffer interface.

Add documentation for this and other PyObject_XXXBuffer() calls.
2001-11-09 21:59:42 +00:00
Fred Drake
1b58bff8a0 More refcount information. 2001-10-29 17:43:14 +00:00
Fred Drake
b0c079e3e5 PyObject_CallFunctionObArgs() ---> PyObject_CallFunctionObjArgs()
PyObject_CallMethodObArgs() ---> PyObject_CallMethodObjArgs()
2001-10-28 02:39:03 +00:00
Fred Drake
c44e9eca66 Added docs for PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs().
Minor cleanups & markup consistency fixes.
2001-10-26 16:38:38 +00:00