| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -343,7 +343,7 @@ Other objects | |||
| 343 | 343 | *items*. Format units for sequences may be nested. | |
| 344 | 344 | ||
| 345 | 345 | It is possible to pass "long" integers (integers whose value exceeds the | |
| 346 | - platform's :const:`LONG_MAX`) however no proper range checking is done --- the | ||
| 346 | + platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- the | ||
| 347 | 347 | most significant bits are silently truncated when the receiving field is too | |
| 348 | 348 | small to receive the value (actually, the semantics are inherited from downcasts | |
| 349 | 349 | in C --- your mileage may vary). | |
@@ -463,7 +463,7 @@ API Functions | |||
| 463 | 463 | ||
| 464 | 464 | A simpler form of parameter retrieval which does not use a format string to | |
| 465 | 465 | specify the types of the arguments. Functions which use this method to retrieve | |
| 466 | - their parameters should be declared as :const:`METH_VARARGS` in function or | ||
| 466 | + their parameters should be declared as :c:macro:`METH_VARARGS` in function or | ||
| 467 | 467 | method tables. The tuple containing the actual parameters should be passed as | |
| 468 | 468 | *args*; it must actually be a tuple. The length of the tuple must be at least | |
| 469 | 469 | *min* and no more than *max*; *min* and *max* may be equal. Additional | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,20 +59,20 @@ This bears repeating: | |||
| 59 | 59 | ||
| 60 | 60 | .. versionchanged:: 3.12 | |
| 61 | 61 | ||
| 62 | - The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class | ||
| 62 | + The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class | ||
| 63 | 63 | when the class's :py:meth:`~object.__call__` method is reassigned. | |
| 64 | 64 | (This internally sets :c:member:`~PyTypeObject.tp_call` only, and thus | |
| 65 | 65 | may make it behave differently than the vectorcall function.) | |
| 66 | 66 | In earlier Python versions, vectorcall should only be used with | |
| 67 | - :const:`immutable <Py_TPFLAGS_IMMUTABLETYPE>` or static types. | ||
| 67 | + :c:macro:`immutable <Py_TPFLAGS_IMMUTABLETYPE>` or static types. | ||
| 68 | 68 | ||
| 69 | 69 | A class should not implement vectorcall if that would be slower | |
| 70 | 70 | than *tp_call*. For example, if the callee needs to convert | |
| 71 | 71 | the arguments to an args tuple and kwargs dict anyway, then there is no point | |
| 72 | 72 | in implementing vectorcall. | |
| 73 | 73 | ||
| 74 | 74 | Classes can implement the vectorcall protocol by enabling the | |
| 75 | - :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting | ||
| 75 | + :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting | ||
| 76 | 76 | :c:member:`~PyTypeObject.tp_vectorcall_offset` to the offset inside the | |
| 77 | 77 | object structure where a *vectorcallfunc* appears. | |
| 78 | 78 | This is a pointer to a function with the following signature: | |
@@ -84,7 +84,7 @@ This is a pointer to a function with the following signature: | |||
| 84 | 84 | values of the keyword arguments. | |
| 85 | 85 | This can be *NULL* if there are no arguments. | |
| 86 | 86 | - *nargsf* is the number of positional arguments plus possibly the | |
| 87 | - :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. | ||
| 87 | + :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. | ||
| 88 | 88 | To get the actual number of positional arguments from *nargsf*, | |
| 89 | 89 | use :c:func:`PyVectorcall_NARGS`. | |
| 90 | 90 | - *kwnames* is a tuple containing the names of the keyword arguments; | |
@@ -93,7 +93,7 @@ This is a pointer to a function with the following signature: | |||
| 93 | 93 | and they must be unique. | |
| 94 | 94 | If there are no keyword arguments, then *kwnames* can instead be *NULL*. | |
| 95 | 95 | ||
| 96 | - .. data:: PY_VECTORCALL_ARGUMENTS_OFFSET | ||
| 96 | + .. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET | ||
| 97 | 97 | ||
| 98 | 98 | If this flag is set in a vectorcall *nargsf* argument, the callee is allowed | |
| 99 | 99 | to temporarily change ``args[-1]``. In other words, *args* points to | |
@@ -104,7 +104,7 @@ This is a pointer to a function with the following signature: | |||
| 104 | 104 | ``args[0]`` may be changed. | |
| 105 | 105 | ||
| 106 | 106 | Whenever they can do so cheaply (without additional allocation), callers | |
| 107 | - are encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. | ||
| 107 | + are encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. | ||
| 108 | 108 | Doing so will allow callables such as bound methods to make their onward | |
| 109 | 109 | calls (which include a prepended *self* argument) very efficiently. | |
| 110 | 110 | ||
@@ -161,7 +161,7 @@ Vectorcall Support API | |||
| 161 | 161 | ||
| 162 | 162 | This is a specialized function, intended to be put in the | |
| 163 | 163 | :c:member:`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. | |
| 164 | - It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag | ||
| 164 | + It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag | ||
| 165 | 165 | and it does not fall back to ``tp_call``. | |
| 166 | 166 | ||
| 167 | 167 | .. versionadded:: 3.8 | |
@@ -379,11 +379,11 @@ please see individual documentation for details. | |||
| 379 | 379 | *args[0]*, and the *args* array starting at *args[1]* represents the arguments | |
| 380 | 380 | of the call. There must be at least one positional argument. | |
| 381 | 381 | *nargsf* is the number of positional arguments including *args[0]*, | |
| 382 | - plus :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may | ||
| 382 | + plus :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may | ||
| 383 | 383 | temporarily be changed. Keyword arguments can be passed just like in | |
| 384 | 384 | :c:func:`PyObject_Vectorcall`. | |
| 385 | 385 | ||
| 386 | - If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, | ||
| 386 | + If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, | ||
| 387 | 387 | this will call the unbound method object with the full | |
| 388 | 388 | *args* vector as arguments. | |
| 389 | 389 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,7 @@ pointers. This is consistent throughout the API. | |||
| 64 | 64 | representation. | |
| 65 | 65 | ||
| 66 | 66 | If *divisor* is null, this method returns zero and sets | |
| 67 | - :c:data:`errno` to :c:data:`EDOM`. | ||
| 67 | + :c:data:`errno` to :c:macro:`EDOM`. | ||
| 68 | 68 | ||
| 69 | 69 | ||
| 70 | 70 | .. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp) | |
@@ -73,7 +73,7 @@ pointers. This is consistent throughout the API. | |||
| 73 | 73 | representation. | |
| 74 | 74 | ||
| 75 | 75 | If *num* is null and *exp* is not a positive real number, | |
| 76 | - this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`. | ||
| 76 | + this method returns zero and sets :c:data:`errno` to :c:macro:`EDOM`. | ||
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | 79 | Complex Numbers as Python Objects | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,7 +165,7 @@ For convenience, some of these functions will always return a | |||
| 165 | 165 | tuple object whose first item is the integer :c:data:`errno` value and whose | |
| 166 | 166 | second item is the corresponding error message (gotten from :c:func:`strerror`), | |
| 167 | 167 | and then calls ``PyErr_SetObject(type, object)``. On Unix, when the | |
| 168 | - :c:data:`errno` value is :const:`EINTR`, indicating an interrupted system call, | ||
| 168 | + :c:data:`errno` value is :c:macro:`EINTR`, indicating an interrupted system call, | ||
| 169 | 169 | this calls :c:func:`PyErr_CheckSignals`, and if that set the error indicator, | |
| 170 | 170 | leaves it set to that. The function always returns ``NULL``, so a wrapper | |
| 171 | 171 | function around a system call can write ``return PyErr_SetFromErrno(type);`` | |
@@ -631,7 +631,7 @@ Signal Handling | |||
| 631 | 631 | be interruptible by user requests (such as by pressing Ctrl-C). | |
| 632 | 632 | ||
| 633 | 633 | .. note:: | |
| 634 | - The default Python signal handler for :const:`SIGINT` raises the | ||
| 634 | + The default Python signal handler for :c:macro:`SIGINT` raises the | ||
| 635 | 635 | :exc:`KeyboardInterrupt` exception. | |
| 636 | 636 | ||
| 637 | 637 | ||
@@ -642,7 +642,7 @@ Signal Handling | |||
| 642 | 642 | single: SIGINT | |
| 643 | 643 | single: KeyboardInterrupt (built-in exception) | |
| 644 | 644 | ||
| 645 | - Simulate the effect of a :const:`SIGINT` signal arriving. | ||
| 645 | + Simulate the effect of a :c:macro:`SIGINT` signal arriving. | ||
| 646 | 646 | This is equivalent to ``PyErr_SetInterruptEx(SIGINT)``. | |
| 647 | 647 | ||
| 648 | 648 | .. note:: | |
@@ -754,7 +754,7 @@ Exception Objects | |||
| 754 | 754 | ||
| 755 | 755 | .. c:function:: PyObject* PyException_GetCause(PyObject *ex) | |
| 756 | 756 | ||
| 757 | - Return the cause (either an exception instance, or :const:`None`, | ||
| 757 | + Return the cause (either an exception instance, or ``None``, | ||
| 758 | 758 | set by ``raise ... from ...``) associated with the exception as a new | |
| 759 | 759 | reference, as accessible from Python through :attr:`__cause__`. | |
| 760 | 760 | ||
@@ -763,7 +763,7 @@ Exception Objects | |||
| 763 | 763 | ||
| 764 | 764 | Set the cause associated with the exception to *cause*. Use ``NULL`` to clear | |
| 765 | 765 | it. There is no type check to make sure that *cause* is either an exception | |
| 766 | - instance or :const:`None`. This steals a reference to *cause*. | ||
| 766 | + instance or ``None``. This steals a reference to *cause*. | ||
| 767 | 767 | ||
| 768 | 768 | :attr:`__suppress_context__` is implicitly set to ``True`` by this function. | |
| 769 | 769 | ||
@@ -874,7 +874,7 @@ because the :ref:`call protocol <call>` takes care of recursion handling. | |||
| 874 | 874 | ||
| 875 | 875 | Marks a point where a recursive C-level call is about to be performed. | |
| 876 | 876 | ||
| 877 | - If :const:`USE_STACKCHECK` is defined, this function checks if the OS | ||
| 877 | + If :c:macro:`USE_STACKCHECK` is defined, this function checks if the OS | ||
| 878 | 878 | stack overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it | |
| 879 | 879 | sets a :exc:`MemoryError` and returns a nonzero value. | |
| 880 | 880 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,7 +93,7 @@ the :mod:`io` APIs instead. | |||
| 93 | 93 | .. index:: single: Py_PRINT_RAW | |
| 94 | 94 | ||
| 95 | 95 | Write object *obj* to file object *p*. The only supported flag for *flags* is | |
| 96 | - :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written | ||
| 96 | + :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written | ||
| 97 | 97 | instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; the | |
| 98 | 98 | appropriate exception will be set. | |
| 99 | 99 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,7 +109,7 @@ Pack functions | |||
| 109 | 109 | The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an | |
| 110 | 110 | :c:expr:`int` argument, non-zero if you want the bytes string in little-endian | |
| 111 | 111 | format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you | |
| 112 | - want big-endian format (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` | ||
| 112 | + want big-endian format (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` | ||
| 113 | 113 | constant can be used to use the native endian: it is equal to ``1`` on big | |
| 114 | 114 | endian processor, or ``0`` on little endian processor. | |
| 115 | 115 | ||
@@ -140,7 +140,7 @@ Unpack functions | |||
| 140 | 140 | The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an | |
| 141 | 141 | :c:expr:`int` argument, non-zero if the bytes string is in little-endian format | |
| 142 | 142 | (exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-endian | |
| 143 | - (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` constant can be used to | ||
| 143 | + (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can be used to | ||
| 144 | 144 | use the native endian: it is equal to ``1`` on big endian processor, or ``0`` | |
| 145 | 145 | on little endian processor. | |
| 146 | 146 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,14 +13,12 @@ or strings), do not need to provide any explicit support for garbage | |||
| 13 | 13 | collection. | |
| 14 | 14 | ||
| 15 | 15 | To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of the type object must | |
| 16 | - include the :const:`Py_TPFLAGS_HAVE_GC` and provide an implementation of the | ||
| 16 | + include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide an implementation of the | ||
| 17 | 17 | :c:member:`~PyTypeObject.tp_traverse` handler. If instances of the type are mutable, a | |
| 18 | 18 | :c:member:`~PyTypeObject.tp_clear` implementation must also be provided. | |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | - .. data:: Py_TPFLAGS_HAVE_GC | ||
| 22 | - :noindex: | ||
| 23 | - | ||
| 21 | + :c:macro:`Py_TPFLAGS_HAVE_GC` | ||
| 24 | 22 | Objects with a type with this flag set must conform with the rules | |
| 25 | 23 | documented here. For convenience these objects will be referred to as | |
| 26 | 24 | container objects. | |
@@ -52,17 +50,17 @@ rules: | |||
| 52 | 50 | :c:member:`~PyTypeObject.tp_flags`, :c:member:`~PyTypeObject.tp_traverse` | |
| 53 | 51 | and :c:member:`~PyTypeObject.tp_clear` fields if the type inherits from a | |
| 54 | 52 | class that implements the garbage collector protocol and the child class | |
| 55 | - does *not* include the :const:`Py_TPFLAGS_HAVE_GC` flag. | ||
| 53 | + does *not* include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag. | ||
| 56 | 54 | ||
| 57 | 55 | .. c:function:: TYPE* PyObject_GC_New(TYPE, PyTypeObject *type) | |
| 58 | 56 | ||
| 59 | 57 | Analogous to :c:func:`PyObject_New` but for container objects with the | |
| 60 | - :const:`Py_TPFLAGS_HAVE_GC` flag set. | ||
| 58 | + :c:macro:`Py_TPFLAGS_HAVE_GC` flag set. | ||
| 61 | 59 | ||
| 62 | 60 | .. c:function:: TYPE* PyObject_GC_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size) | |
| 63 | 61 | ||
| 64 | 62 | Analogous to :c:func:`PyObject_NewVar` but for container objects with the | |
| 65 | - :const:`Py_TPFLAGS_HAVE_GC` flag set. | ||
| 63 | + :c:macro:`Py_TPFLAGS_HAVE_GC` flag set. | ||
| 66 | 64 | ||
| 67 | 65 | .. c:function:: PyObject* PyUnstable_Object_GC_NewWithExtraData(PyTypeObject *type, size_t extra_size) | |
| 68 | 66 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1161,7 +1161,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`. | |||
| 1161 | 1161 | function does not steal any references to *exc*. To prevent naive misuse, you | |
| 1162 | 1162 | must write your own C extension to call this. Must be called with the GIL held. | |
| 1163 | 1163 | Returns the number of thread states modified; this is normally one, but will be | |
| 1164 | - zero if the thread id isn't found. If *exc* is :const:`NULL`, the pending | ||
| 1164 | + zero if the thread id isn't found. If *exc* is ``NULL``, the pending | ||
| 1165 | 1165 | exception (if any) for the thread is cleared. This raises no exceptions. | |
| 1166 | 1166 | ||
| 1167 | 1167 | .. versionchanged:: 3.7 | |
@@ -1407,32 +1407,32 @@ Python-level trace functions in previous versions. | |||
| 1407 | 1407 | The type of the trace function registered using :c:func:`PyEval_SetProfile` and | |
| 1408 | 1408 | :c:func:`PyEval_SetTrace`. The first parameter is the object passed to the | |
| 1409 | 1409 | registration function as *obj*, *frame* is the frame object to which the event | |
| 1410 | - pertains, *what* is one of the constants :const:`PyTrace_CALL`, | ||
| 1411 | - :const:`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, | ||
| 1412 | - :const:`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, | ||
| 1413 | - or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*: | ||
| 1414 | - | ||
| 1415 | - +------------------------------+----------------------------------------+ | ||
| 1416 | - | Value of *what* | Meaning of *arg* | | ||
| 1417 | - +==============================+========================================+ | ||
| 1418 | - | :const:`PyTrace_CALL` | Always :c:data:`Py_None`. | | ||
| 1419 | - +------------------------------+----------------------------------------+ | ||
| 1420 | - | :const:`PyTrace_EXCEPTION` | Exception information as returned by | | ||
| 1421 | - | | :func:`sys.exc_info`. | | ||
| 1422 | - +------------------------------+----------------------------------------+ | ||
| 1423 | - | :const:`PyTrace_LINE` | Always :c:data:`Py_None`. | | ||
| 1424 | - +------------------------------+----------------------------------------+ | ||
| 1425 | - | :const:`PyTrace_RETURN` | Value being returned to the caller, | | ||
| 1426 | - | | or ``NULL`` if caused by an exception. | | ||
| 1427 | - +------------------------------+----------------------------------------+ | ||
| 1428 | - | :const:`PyTrace_C_CALL` | Function object being called. | | ||
| 1429 | - +------------------------------+----------------------------------------+ | ||
| 1430 | - | :const:`PyTrace_C_EXCEPTION` | Function object being called. | | ||
| 1431 | - +------------------------------+----------------------------------------+ | ||
| 1432 | - | :const:`PyTrace_C_RETURN` | Function object being called. | | ||
| 1433 | - +------------------------------+----------------------------------------+ | ||
| 1434 | - | :const:`PyTrace_OPCODE` | Always :c:data:`Py_None`. | | ||
| 1435 | - +------------------------------+----------------------------------------+ | ||
| 1410 | + pertains, *what* is one of the constants :c:data:`PyTrace_CALL`, | ||
| 1411 | + :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, | ||
| 1412 | + :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN`, | ||
| 1413 | + or :c:data:`PyTrace_OPCODE`, and *arg* depends on the value of *what*: | ||
| 1414 | + | ||
| 1415 | + +-------------------------------+----------------------------------------+ | ||
| 1416 | + | Value of *what* | Meaning of *arg* | | ||
| 1417 | + +===============================+========================================+ | ||
| 1418 | + | :c:data:`PyTrace_CALL` | Always :c:data:`Py_None`. | | ||
| 1419 | + +-------------------------------+----------------------------------------+ | ||
| 1420 | + | :c:data:`PyTrace_EXCEPTION` | Exception information as returned by | | ||
| 1421 | + | | :func:`sys.exc_info`. | | ||
| 1422 | + +-------------------------------+----------------------------------------+ | ||
| 1423 | + | :c:data:`PyTrace_LINE` | Always :c:data:`Py_None`. | | ||
| 1424 | + +-------------------------------+----------------------------------------+ | ||
| 1425 | + | :c:data:`PyTrace_RETURN` | Value being returned to the caller, | | ||
| 1426 | + | | or ``NULL`` if caused by an exception. | | ||
| 1427 | + +-------------------------------+----------------------------------------+ | ||
| 1428 | + | :c:data:`PyTrace_C_CALL` | Function object being called. | | ||
| 1429 | + +-------------------------------+----------------------------------------+ | ||
| 1430 | + | :c:data:`PyTrace_C_EXCEPTION` | Function object being called. | | ||
| 1431 | + +-------------------------------+----------------------------------------+ | ||
| 1432 | + | :c:data:`PyTrace_C_RETURN` | Function object being called. | | ||
| 1433 | + +-------------------------------+----------------------------------------+ | ||
| 1434 | + | :c:data:`PyTrace_OPCODE` | Always :c:data:`Py_None`. | | ||
| 1435 | + +-------------------------------+----------------------------------------+ | ||
| 1436 | 1436 | ||
| 1437 | 1437 | .. c:var:: int PyTrace_CALL | |
| 1438 | 1438 | ||
@@ -1499,8 +1499,8 @@ Python-level trace functions in previous versions. | |||
| 1499 | 1499 | function as its first parameter, and may be any Python object, or ``NULL``. If | |
| 1500 | 1500 | the profile function needs to maintain state, using a different value for *obj* | |
| 1501 | 1501 | for each thread provides a convenient and thread-safe place to store it. The | |
| 1502 | - profile function is called for all monitored events except :const:`PyTrace_LINE` | ||
| 1503 | - :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`. | ||
| 1502 | + profile function is called for all monitored events except :c:data:`PyTrace_LINE` | ||
| 1503 | + :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`. | ||
| 1504 | 1504 | ||
| 1505 | 1505 | See also the :func:`sys.setprofile` function. | |
| 1506 | 1506 | ||
@@ -1525,8 +1525,8 @@ Python-level trace functions in previous versions. | |||
| 1525 | 1525 | :c:func:`PyEval_SetProfile`, except the tracing function does receive line-number | |
| 1526 | 1526 | events and per-opcode events, but does not receive any event related to C function | |
| 1527 | 1527 | objects being called. Any trace function registered using :c:func:`PyEval_SetTrace` | |
| 1528 | - will not receive :const:`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION` or | ||
| 1529 | - :const:`PyTrace_C_RETURN` as a value for the *what* parameter. | ||
| 1528 | + will not receive :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` or | ||
| 1529 | + :c:data:`PyTrace_C_RETURN` as a value for the *what* parameter. | ||
| 1530 | 1530 | ||
| 1531 | 1531 | See also the :func:`sys.settrace` function. | |
| 1532 | 1532 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -142,8 +142,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. | |||
| 142 | 142 | instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` | |
| 143 | 143 | method (if present) to convert it to a :c:type:`PyLongObject`. | |
| 144 | 144 | ||
| 145 | - If the value of *obj* is greater than :const:`LONG_MAX` or less than | ||
| 146 | - :const:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and | ||
| 145 | + If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than | ||
| 146 | + :c:macro:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and | ||
| 147 | 147 | return ``-1``; otherwise, set *\*overflow* to ``0``. If any other exception | |
| 148 | 148 | occurs set *\*overflow* to ``0`` and return ``-1`` as usual. | |
| 149 | 149 | ||
@@ -183,8 +183,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. | |||
| 183 | 183 | instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` method | |
| 184 | 184 | (if present) to convert it to a :c:type:`PyLongObject`. | |
| 185 | 185 | ||
| 186 | - If the value of *obj* is greater than :const:`LLONG_MAX` or less than | ||
| 187 | - :const:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, | ||
| 186 | + If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than | ||
| 187 | + :c:macro:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, | ||
| 188 | 188 | and return ``-1``; otherwise, set *\*overflow* to ``0``. If any other | |
| 189 | 189 | exception occurs set *\*overflow* to ``0`` and return ``-1`` as usual. | |
| 190 | 190 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments