]> granicus.if.org Git - python/commitdiff
Try to discourage use of PyObject_Type().
authorGuido van Rossum <guido@python.org>
Wed, 9 Apr 2003 18:02:23 +0000 (18:02 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Apr 2003 18:02:23 +0000 (18:02 +0000)
Doc/api/abstract.tex

index 0822f620ee389f48764578e84962076a8ef8f1b7..a8bcc158defa34439f6c5dd49457d1bd9c2624e3 100644 (file)
@@ -319,6 +319,11 @@ determination.
   the object type of object \var{o}. On failure, raises
   \exception{SystemError} and returns \NULL.  This is equivalent to
   the Python expression \code{type(\var{o})}.
+  This function increments the reference count of the return value.
+  There's really no reason to use this function instead of the
+  common expression \code{\var{o}->ob_type}, which returns a pointer
+  of type \code{PyTypeObject *}, except when the incremented reference
+  count is needed.
   \bifuncindex{type}
 \end{cfuncdesc}