Staging
v0.5.1
https://github.com/python/cpython
Revision 4979b9b91ebfaefa53e44546097db7a5eab7e547 authored by Alexander Belopolsky on 18 November 2010, 01:58:16 UTC, committed by Alexander Belopolsky on 18 November 2010, 01:58:16 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86504 | alexander.belopolsky | 2010-11-17 20:52:54 -0500 (Wed, 17 Nov 2010) | 15 lines

  Issue #10446: Several changes to module documentation generated by pydoc:

  1. Online reference manual link is now version-specific and the
     'MODULE DOCS' section renamed to 'MODULE REFERENCE'.

  2. 'FILE' section is moved to the end of the file.

  3. Special names processed by pydoc such as __version__ or __credits__
     are now excluded from the DATA section.

  4. Defined __all__ to prevent pydoc from exposing undocumented details
     about itself.

  5. Removed Python 2.3 compatibility code.
........
1 parent 6083170
Raw File
Tip revision: 4979b9b91ebfaefa53e44546097db7a5eab7e547 authored by Alexander Belopolsky on 18 November 2010, 01:58:16 UTC
Merged revisions 86504 via svnmerge from
Tip revision: 4979b9b
boolobject.h
/* Boolean object interface */

#ifndef Py_BOOLOBJECT_H
#define Py_BOOLOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif


PyAPI_DATA(PyTypeObject) PyBool_Type;

#define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type)

/* Py_False and Py_True are the only two bools in existence.
Don't forget to apply Py_INCREF() when returning either!!! */

/* Don't use these directly */
PyAPI_DATA(struct _longobject) _Py_FalseStruct, _Py_TrueStruct;

/* Use these macros */
#define Py_False ((PyObject *) &_Py_FalseStruct)
#define Py_True ((PyObject *) &_Py_TrueStruct)

/* Macros for returning Py_True or Py_False, respectively */
#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False

/* Function to return a bool from a C long */
PyAPI_FUNC(PyObject *) PyBool_FromLong(long);

#ifdef __cplusplus
}
#endif
#endif /* !Py_BOOLOBJECT_H */
back to top