cython

Форк
0
47 строк · 1.6 Кб
1
cdef extern from *:
2
    """
3
    #if PY_MAJOR_VERSION >= 3
4
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
5
    #else
6
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
7
    #endif
8
    """
9

10
cdef extern from "Python.h":
11
    ############################################################################
12
    # 7.2.3
13
    ############################################################################
14
    # PyFloatObject
15
    #
16
    # This subtype of PyObject represents a Python floating point object.
17

18
    # PyTypeObject PyFloat_Type
19
    #
20
    # This instance of PyTypeObject represents the Python floating
21
    # point type. This is the same object as float and
22
    # types.FloatType.
23

24
    bint PyFloat_Check(object p)
25
    # Return true if its argument is a PyFloatObject or a subtype of
26
    # PyFloatObject.
27

28
    bint PyFloat_CheckExact(object p)
29
    # Return true if its argument is a PyFloatObject, but not a
30
    # subtype of PyFloatObject.
31

32
    object PyFloat_FromString "__Pyx_PyFloat_FromString" (object str)
33
    # Return value: New reference.
34
    # Create a PyFloatObject object based on the string value in str,
35
    # or NULL on failure. The pend argument is ignored. It remains
36
    # only for backward compatibility.
37

38
    object PyFloat_FromDouble(double v)
39
    # Return value: New reference.
40
    # Create a PyFloatObject object from v, or NULL on failure.
41

42
    double PyFloat_AsDouble(object pyfloat) except? -1
43
    # Return a C double representation of the contents of pyfloat.
44

45
    double PyFloat_AS_DOUBLE(object pyfloat)
46
    # Return a C double representation of the contents of pyfloat, but
47
    # without error checking.
48

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.