Home
last modified time | relevance | path

Searched refs:posobj (Results 1 – 10 of 10) sorted by relevance

/external/python/cpython2/Modules/_io/
Dfileio.c71 portable_lseek(int fd, PyObject *posobj, int whence);
73 static PyObject *portable_lseek(int fd, PyObject *posobj, int whence);
753 portable_lseek(int fd, PyObject *posobj, int whence) in portable_lseek() argument
772 if (posobj == NULL) in portable_lseek()
775 if(PyFloat_Check(posobj)) { in portable_lseek()
780 pos = PyLong_AsLongLong(posobj); in portable_lseek()
782 pos = PyLong_AsLong(posobj); in portable_lseek()
811 PyObject *posobj; in fileio_seek() local
817 if (!PyArg_ParseTuple(args, "O|i", &posobj, &whence)) in fileio_seek()
820 return portable_lseek(self->fd, posobj, whence); in fileio_seek()
[all …]
Dtextio.c2011 PyObject *cookieObj, *posobj; in textiowrapper_seek() local
2115 posobj = PyLong_FromOff_t(cookie.start_pos); in textiowrapper_seek()
2116 if (posobj == NULL) in textiowrapper_seek()
2119 _PyIO_str_seek, posobj, NULL); in textiowrapper_seek()
2120 Py_DECREF(posobj); in textiowrapper_seek()
2195 PyObject *posobj = NULL; in textiowrapper_tell() local
2223 posobj = PyObject_CallMethod(self->buffer, "tell", NULL); in textiowrapper_tell()
2224 if (posobj == NULL) in textiowrapper_tell()
2229 return posobj; in textiowrapper_tell()
2233 cookie.start_pos = PyLong_AsLongLong(posobj); in textiowrapper_tell()
[all …]
Dstringio.c409 PyObject *posobj; in stringio_seek() local
414 if (!PyArg_ParseTuple(args, "O|i:seek", &posobj, &mode)) in stringio_seek()
417 pos = PyNumber_AsSsize_t(posobj, PyExc_OverflowError); in stringio_seek()
Dbytesio.c504 PyObject *posobj; in bytesio_seek() local
510 if (!PyArg_ParseTuple(args, "O|i:seek", &posobj, &mode)) in bytesio_seek()
513 pos = PyNumber_AsSsize_t(posobj, PyExc_OverflowError); in bytesio_seek()
Dbufferedio.c644 PyObject *res, *posobj, *whenceobj; in _buffered_raw_seek() local
647 posobj = PyLong_FromOff_t(target); in _buffered_raw_seek()
648 if (posobj == NULL) in _buffered_raw_seek()
652 Py_DECREF(posobj); in _buffered_raw_seek()
656 posobj, whenceobj, NULL); in _buffered_raw_seek()
657 Py_DECREF(posobj); in _buffered_raw_seek()
/external/python/cpython3/Modules/_io/
Dfileio.c79 static PyObject* portable_lseek(fileio *self, PyObject *posobj, int whence, bool suppress_pipe_erro…
874 portable_lseek(fileio *self, PyObject *posobj, int whence, bool suppress_pipe_error) argument
894 if (posobj == NULL) {
898 if(PyFloat_Check(posobj)) {
903 pos = PyLong_AsLongLong(posobj);
905 pos = PyLong_AsLong(posobj);
998 _io_FileIO_truncate_impl(fileio *self, PyObject *posobj) argument
1011 if (posobj == Py_None) {
1013 posobj = portable_lseek(self, NULL, 1, false);
1014 if (posobj == NULL)
[all …]
Dtextio.c2446 PyObject *posobj; in _io_TextIOWrapper_seek_impl() local
2554 posobj = PyLong_FromOff_t(cookie.start_pos); in _io_TextIOWrapper_seek_impl()
2555 if (posobj == NULL) in _io_TextIOWrapper_seek_impl()
2557 res = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj); in _io_TextIOWrapper_seek_impl()
2558 Py_DECREF(posobj); in _io_TextIOWrapper_seek_impl()
2639 PyObject *posobj = NULL; in _io_TextIOWrapper_tell_impl() local
2669 posobj = _PyObject_CallMethodIdNoArgs(self->buffer, &PyId_tell); in _io_TextIOWrapper_tell_impl()
2670 if (posobj == NULL) in _io_TextIOWrapper_tell_impl()
2675 return posobj; in _io_TextIOWrapper_tell_impl()
2679 cookie.start_pos = PyLong_AsLongLong(posobj); in _io_TextIOWrapper_tell_impl()
[all …]
Dbufferedio.c689 PyObject *res, *posobj, *whenceobj; in _buffered_raw_seek() local
692 posobj = PyLong_FromOff_t(target); in _buffered_raw_seek()
693 if (posobj == NULL) in _buffered_raw_seek()
697 Py_DECREF(posobj); in _buffered_raw_seek()
701 posobj, whenceobj, NULL); in _buffered_raw_seek()
702 Py_DECREF(posobj); in _buffered_raw_seek()
/external/python/cpython3/Modules/_io/clinic/
Dfileio.c.h405 _io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
411 PyObject *posobj = Py_None; in _io_FileIO_truncate() local
419 posobj = args[0]; in _io_FileIO_truncate()
421 return_value = _io_FileIO_truncate_impl(self, posobj); in _io_FileIO_truncate()
/external/python/cpython2/Modules/
Dposixmodule.c6744 PyObject *posobj; in posix_lseek() local
6745 if (!PyArg_ParseTuple(args, "iOi:lseek", &fd, &posobj, &how)) in posix_lseek()
6757 pos = PyInt_AsLong(posobj); in posix_lseek()
6759 pos = PyLong_Check(posobj) ? in posix_lseek()
6760 PyLong_AsLongLong(posobj) : PyInt_AsLong(posobj); in posix_lseek()