error (i.e. the object does not have a buffer interface or
it is not working).
- If fortran is 'F', then if the object is multi-dimensional,
+ If fort is 'F', then if the object is multi-dimensional,
then the data will be copied into the array in
Fortran-style (first dimension varies the fastest). If
- fortran is 'C', then the data will be copied into the array
- in C-style (last dimension varies the fastest). If fortran
+ fort is 'C', then the data will be copied into the array
+ in C-style (last dimension varies the fastest). If fort
is 'A', then it does not matter and the copy will be made
in whatever way is more efficient.
/* Copy the data from the src buffer to the buffer of destination
*/
- PyAPI_FUNC(int) PyBuffer_IsContiguous(Py_buffer *view, char fortran);
+ PyAPI_FUNC(int) PyBuffer_IsContiguous(Py_buffer *view, char fort);
PyAPI_FUNC(void) PyBuffer_FillContiguousStrides(int ndims,
char fort);
/* Fill the strides array with byte-strides of a contiguous
- (Fortran-style if fortran is 'F' or C-style otherwise)
+ (Fortran-style if fort is 'F' or C-style otherwise)
array of the given shape with the given number of bytes
per element.
*/
return PyString_FromStringAndSize(s, 1);
}
+#if _MSC_VER >= 1300
static PyObject *
msvcrt_getwch(PyObject *self, PyObject *args)
{
u[0] = ch;
return PyUnicode_FromUnicode(u, 1);
}
+#endif
static PyObject *
msvcrt_getche(PyObject *self, PyObject *args)
return PyString_FromStringAndSize(s, 1);
}
+#if _MSC_VER >= 1300
static PyObject *
msvcrt_getwche(PyObject *self, PyObject *args)
{
s[0] = ch;
return PyUnicode_FromUnicode(s, 1);
}
+#endif
static PyObject *
msvcrt_putch(PyObject *self, PyObject *args)
}
+#if _MSC_VER >= 1300
static PyObject *
msvcrt_putwch(PyObject *self, PyObject *args)
{
Py_RETURN_NONE;
}
+#endif
static PyObject *
msvcrt_ungetch(PyObject *self, PyObject *args)
return Py_None;
}
+#if _MSC_VER >= 1300
static PyObject *
msvcrt_ungetwch(PyObject *self, PyObject *args)
{
Py_INCREF(Py_None);
return Py_None;
}
+#endif
static void
insertint(PyObject *d, char *name, int value)
{"CrtSetReportMode", msvcrt_setreportmode, METH_VARARGS},
{"set_error_mode", msvcrt_seterrormode, METH_VARARGS},
#endif
+#if _MSC_VER >= 1300
{"getwch", msvcrt_getwch, METH_VARARGS},
{"getwche", msvcrt_getwche, METH_VARARGS},
{"putwch", msvcrt_putwch, METH_VARARGS},
{"ungetwch", msvcrt_ungetwch, METH_VARARGS},
+#endif
{NULL, NULL}
};