Commit graph

35 commits

Author SHA1 Message Date
Thomas Heller
33ceda85d0 Function signatures for tp_descr_get and tp_descr_set. 2005-03-24 07:45:53 +00:00
Andrew M. Kuchling
672d2ba773 Use LaTeX markup 2004-08-07 20:17:48 +00:00
Tim Peters
eda29306b3 Formalize that the Py_VISIT macro requires that the tp_traverse
implementation it's used in must give its arguments specific names.
2004-07-15 04:05:59 +00:00
Jim Fulton
aa6389e13b Documented the new Py_VISIT macro to simplify implementation of
tp_traverse handlers. (Tim made me do it. ;)
2004-07-14 19:08:17 +00:00
Tim Peters
e45d5a3b00 Claifications: visit procs are supplied by the core, users aren't
expected to write their own.  A NULL "object" must not be passed to
the visit callback.  A non-zero return from a visit proc isn't
necessarily an error return (and it doesn't matter to the tp_traverse
code *what* it might signify, their only job is to return it).
2004-07-13 17:18:10 +00:00
Fred Drake
70a30e8c94 markup correction 2004-02-17 04:17:36 +00:00
Martin v. Löwis
d3f4a1a00a Patch #893566: Document that tp_dealloc may be called from any thread. 2004-02-15 21:01:17 +00:00
Raymond Hettinger
8f5cdaa784 * Added a new method flag, METH_COEXIST.
* Used the flag to optimize set.__contains__(), dict.__contains__(),
  dict.__getitem__(), and list.__getitem__().
2003-12-13 11:26:12 +00:00
Raymond Hettinger
e180307c10 Fix missing paren. 2003-12-07 12:49:48 +00:00
Raymond Hettinger
2619c9ec89 SF patch #838938: Typos in the docs (Extending/Embedding + Python/C API)
(Contributed by Florent Rougon.)
2003-12-07 11:40:17 +00:00
Martin v. Löwis
95cf84a4f3 Patch #821093: Fix various typos. 2003-10-19 07:32:24 +00:00
Raymond Hettinger
9bd308f67b Fix doubled word typos. 2003-08-25 04:43:53 +00:00
Fred Drake
b93b3e790e Error noted in email to python-docs: PyObject corresponds to
PyObject_HEAD, not PyObject_VAR_HEAD.
2003-07-07 17:20:40 +00:00
Fred Drake
9e1595e6e4 Minor clarification about the ob_size field. 2003-03-07 15:02:03 +00:00
Michael W. Hudson
1e71b04258 Update advice about __module__ and __name__ and tp_name wrt. new types.
Add \refs to GC section that were XXXed out.
2003-02-10 19:18:21 +00:00
Michael W. Hudson
847f37543f Correct lie about METH_NOARGS functions.
Backport candidate.
2003-02-06 18:37:11 +00:00
Raymond Hettinger
89fc4f3e56 Fix typo 2003-01-31 05:44:25 +00:00
Fred Drake
71f5acdd1e Minor cleanups, markup. 2002-11-05 22:19:45 +00:00
Neal Norwitz
1aca2d0cb3 Fix SF # 518775, buffer object API description truncated 2002-11-03 02:56:27 +00:00
Raymond Hettinger
d3e0265373 Document type and semantics of the tp_print return value. Closes SF 606464. 2002-09-10 13:48:01 +00:00
Fred Drake
794643c314 Py_InitModule() and friends now accept NULL for the 'methods'
argument.  This makes sense now that extension types can support
__init__ directly rather than requiring function constructors.
2002-08-14 20:59:38 +00:00
Guido van Rossum
43af5b5852 Add some fine points: METH_KEYWORDS implies METH_VARARGS, and ob_size
is no longer unused in type objects.
2002-08-06 17:18:56 +00:00
Guido van Rossum
9788384d02 Explain that tp_basicsize must provide alignment for the items. 2002-05-31 21:00:18 +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
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
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
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
68304ccce3 Move reference material on PyArg_Parse*() out of the Extending & Embedding
document to the C API reference.  Move some instructional text from the API
reference to the Extending & Embedding manual.

Fix the descriptions of the es and es# formats for PyArg_Parse*().
This closes SF bug #536516.
2002-04-05 23:01:14 +00:00
Fred Drake
7bf9715a8b Introduce two new flag bits that can be set in a PyMethodDef method
descriptor, as used for the tp_methods slot of a type.  These new flag
bits are both optional, and mutually exclusive.  Most methods will not
use either.  These flags are used to create special method types which
exist in the same namespace as normal methods without having to use
tedious construction code to insert the new special method objects in
the type's tp_dict after PyType_Ready() has been called.

If METH_CLASS is specified, the method will represent a class method
like that returned by the classmethod() built-in.

If METH_STATIC is specified, the method will represent a static method
like that returned by the staticmethod() built-in.

These flags may not be used in the PyMethodDef table for modules since
these special method types are not meaningful in that case; a
ValueError will be raised if these flags are found in that context.
2002-03-28 05:33:33 +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
50ecc15d05 Add omitted word for clarity. 2001-11-17 06:39:18 +00:00
Fred Drake
3adf79e3e2 Break the Python/C API manual into smaller files by chapter. This manual
has grown beyond what font-lock will work with using the default (X)Emacs
settings.

Indentation of the description has been made consistent, and a number of
smaller markup adjustments have been made as well.
2001-10-12 19:01:43 +00:00