Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/c-api/complex.rst

    r2 r391  
    2222
    2323
    24 .. ctype:: Py_complex
     24.. c:type:: Py_complex
    2525
    2626   The C structure which corresponds to the value portion of a Python complex
     
    3535
    3636
    37 .. cfunction:: Py_complex _Py_c_sum(Py_complex left, Py_complex right)
     37.. c:function:: Py_complex _Py_c_sum(Py_complex left, Py_complex right)
    3838
    39    Return the sum of two complex numbers, using the C :ctype:`Py_complex`
     39   Return the sum of two complex numbers, using the C :c:type:`Py_complex`
    4040   representation.
    4141
    4242
    43 .. cfunction:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
     43.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
    4444
    4545   Return the difference between two complex numbers, using the C
    46    :ctype:`Py_complex` representation.
     46   :c:type:`Py_complex` representation.
    4747
    4848
    49 .. cfunction:: Py_complex _Py_c_neg(Py_complex complex)
     49.. c:function:: Py_complex _Py_c_neg(Py_complex complex)
    5050
    5151   Return the negation of the complex number *complex*, using the C
    52    :ctype:`Py_complex` representation.
     52   :c:type:`Py_complex` representation.
    5353
    5454
    55 .. cfunction:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)
     55.. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)
    5656
    57    Return the product of two complex numbers, using the C :ctype:`Py_complex`
     57   Return the product of two complex numbers, using the C :c:type:`Py_complex`
    5858   representation.
    5959
    6060
    61 .. cfunction:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
     61.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
    6262
    63    Return the quotient of two complex numbers, using the C :ctype:`Py_complex`
     63   Return the quotient of two complex numbers, using the C :c:type:`Py_complex`
    6464   representation.
    6565
     66   If *divisor* is null, this method returns zero and sets
     67   :c:data:`errno` to :c:data:`EDOM`.
    6668
    67 .. cfunction:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
    6869
    69    Return the exponentiation of *num* by *exp*, using the C :ctype:`Py_complex`
     70.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
     71
     72   Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex`
    7073   representation.
     74
     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`.
    7177
    7278
     
    7581
    7682
    77 .. ctype:: PyComplexObject
     83.. c:type:: PyComplexObject
    7884
    79    This subtype of :ctype:`PyObject` represents a Python complex number object.
     85   This subtype of :c:type:`PyObject` represents a Python complex number object.
    8086
    8187
    82 .. cvar:: PyTypeObject PyComplex_Type
     88.. c:var:: PyTypeObject PyComplex_Type
    8389
    84    This instance of :ctype:`PyTypeObject` represents the Python complex number
     90   This instance of :c:type:`PyTypeObject` represents the Python complex number
    8591   type. It is the same object as ``complex`` and ``types.ComplexType``.
    8692
    8793
    88 .. cfunction:: int PyComplex_Check(PyObject *p)
     94.. c:function:: int PyComplex_Check(PyObject *p)
    8995
    90    Return true if its argument is a :ctype:`PyComplexObject` or a subtype of
    91    :ctype:`PyComplexObject`.
     96   Return true if its argument is a :c:type:`PyComplexObject` or a subtype of
     97   :c:type:`PyComplexObject`.
    9298
    9399   .. versionchanged:: 2.2
     
    95101
    96102
    97 .. cfunction:: int PyComplex_CheckExact(PyObject *p)
     103.. c:function:: int PyComplex_CheckExact(PyObject *p)
    98104
    99    Return true if its argument is a :ctype:`PyComplexObject`, but not a subtype of
    100    :ctype:`PyComplexObject`.
     105   Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of
     106   :c:type:`PyComplexObject`.
    101107
    102108   .. versionadded:: 2.2
    103109
    104110
    105 .. cfunction:: PyObject* PyComplex_FromCComplex(Py_complex v)
     111.. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v)
    106112
    107    Create a new Python complex number object from a C :ctype:`Py_complex` value.
     113   Create a new Python complex number object from a C :c:type:`Py_complex` value.
    108114
    109115
    110 .. cfunction:: PyObject* PyComplex_FromDoubles(double real, double imag)
     116.. c:function:: PyObject* PyComplex_FromDoubles(double real, double imag)
    111117
    112    Return a new :ctype:`PyComplexObject` object from *real* and *imag*.
     118   Return a new :c:type:`PyComplexObject` object from *real* and *imag*.
    113119
    114120
    115 .. cfunction:: double PyComplex_RealAsDouble(PyObject *op)
     121.. c:function:: double PyComplex_RealAsDouble(PyObject *op)
    116122
    117    Return the real part of *op* as a C :ctype:`double`.
     123   Return the real part of *op* as a C :c:type:`double`.
    118124
    119125
    120 .. cfunction:: double PyComplex_ImagAsDouble(PyObject *op)
     126.. c:function:: double PyComplex_ImagAsDouble(PyObject *op)
    121127
    122    Return the imaginary part of *op* as a C :ctype:`double`.
     128   Return the imaginary part of *op* as a C :c:type:`double`.
    123129
    124130
    125 .. cfunction:: Py_complex PyComplex_AsCComplex(PyObject *op)
     131.. c:function:: Py_complex PyComplex_AsCComplex(PyObject *op)
    126132
    127    Return the :ctype:`Py_complex` value of the complex number *op*.
     133   Return the :c:type:`Py_complex` value of the complex number *op*.
     134   Upon failure, this method returns ``-1.0`` as a real value.
    128135
    129136   .. versionchanged:: 2.6
Note: See TracChangeset for help on using the changeset viewer.