Lines Matching refs:args
133 _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
149 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, argsbuf);
150 if (!args) {
153 file = args[0];
157 if (args[1]) {
158 if (!PyUnicode_Check(args[1])) {
159 _PyArg_BadArgument("open", "argument 'mode'", "str", args[1]);
163 mode = PyUnicode_AsUTF8AndSize(args[1], &mode_length);
175 if (args[2]) {
176 buffering = _PyLong_AsInt(args[2]);
184 if (args[3]) {
185 if (args[3] == Py_None) {
188 else if (PyUnicode_Check(args[3])) {
190 encoding = PyUnicode_AsUTF8AndSize(args[3], &encoding_length);
200 _PyArg_BadArgument("open", "argument 'encoding'", "str or None", args[3]);
207 if (args[4]) {
208 if (args[4] == Py_None) {
211 else if (PyUnicode_Check(args[4])) {
213 errors = PyUnicode_AsUTF8AndSize(args[4], &errors_length);
223 _PyArg_BadArgument("open", "argument 'errors'", "str or None", args[4]);
230 if (args[5]) {
231 if (args[5] == Py_None) {
234 else if (PyUnicode_Check(args[5])) {
236 newline = PyUnicode_AsUTF8AndSize(args[5], &newline_length);
246 _PyArg_BadArgument("open", "argument 'newline'", "str or None", args[5]);
253 if (args[6]) {
254 closefd = _PyLong_AsInt(args[6]);
262 opener = args[7];
293 _io_text_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
302 encoding = args[0];
306 stacklevel = _PyLong_AsInt(args[1]);
333 _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
341 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
342 if (!args) {
345 if (!PyUnicode_Check(args[0])) {
346 _PyArg_BadArgument("open_code", "argument 'path'", "str", args[0]);
349 if (PyUnicode_READY(args[0]) == -1) {
352 path = args[0];