• Home
  • Raw
  • Download

Lines Matching refs:dialect

95     DialectObj *dialect;    /* parsing dialect */  member
115 DialectObj *dialect; /* parsing dialect */ member
342 PyObject *dialect = NULL; in dialect_new() local
354 &dialect, in dialect_new()
365 if (dialect != NULL) { in dialect_new()
366 if (PyUnicode_Check(dialect)) { in dialect_new()
367 dialect = get_dialect_from_registry(dialect); in dialect_new()
368 if (dialect == NULL) in dialect_new()
372 Py_INCREF(dialect); in dialect_new()
374 if (PyObject_TypeCheck(dialect, &Dialect_Type) && in dialect_new()
383 return dialect; in dialect_new()
388 Py_XDECREF(dialect); in dialect_new()
401 if (dialect != NULL) { in dialect_new()
404 v = PyObject_GetAttrString(dialect, n) in dialect_new()
453 Py_XDECREF(dialect); in dialect_new()
603 DialectObj *dialect = self->dialect; in parse_process_char() local
626 else if (c == dialect->quotechar && in parse_process_char()
627 dialect->quoting != QUOTE_NONE) { in parse_process_char()
631 else if (c == dialect->escapechar) { in parse_process_char()
635 else if (c == ' ' && dialect->skipinitialspace) in parse_process_char()
638 else if (c == dialect->delimiter) { in parse_process_char()
645 if (dialect->quoting == QUOTE_NONNUMERIC) in parse_process_char()
680 else if (c == dialect->escapechar) { in parse_process_char()
684 else if (c == dialect->delimiter) { in parse_process_char()
701 else if (c == dialect->escapechar) { in parse_process_char()
705 else if (c == dialect->quotechar && in parse_process_char()
706 dialect->quoting != QUOTE_NONE) { in parse_process_char()
707 if (dialect->doublequote) { in parse_process_char()
733 if (dialect->quoting != QUOTE_NONE && in parse_process_char()
734 c == dialect->quotechar) { in parse_process_char()
740 else if (c == dialect->delimiter) { in parse_process_char()
752 else if (!dialect->strict) { in parse_process_char()
760 dialect->delimiter, in parse_process_char()
761 dialect->quotechar); in parse_process_char()
811 if (self->dialect->strict) in Reader_iternext()
867 Py_XDECREF(self->dialect); in Reader_dealloc()
878 Py_VISIT(self->dialect); in Reader_traverse()
887 Py_CLEAR(self->dialect); in Reader_clear()
906 { "dialect", T_OBJECT, R_OFF(dialect), READONLY },
951 PyObject * iterator, * dialect = NULL; in csv_reader() local
957 self->dialect = NULL; in csv_reader()
969 if (!PyArg_UnpackTuple(args, "", 1, 2, &iterator, &dialect)) { in csv_reader()
980 self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); in csv_reader()
981 if (self->dialect == NULL) { in csv_reader()
1011 DialectObj *dialect = self->dialect; in join_append_data() local
1034 ADDCH(dialect->delimiter); in join_append_data()
1038 ADDCH(dialect->quotechar); in join_append_data()
1046 if (c == dialect->delimiter || in join_append_data()
1047 c == dialect->escapechar || in join_append_data()
1048 c == dialect->quotechar || in join_append_data()
1050 dialect->lineterminator, c, 0, in join_append_data()
1051 PyUnicode_GET_LENGTH(dialect->lineterminator), 1) >= 0) { in join_append_data()
1052 if (dialect->quoting == QUOTE_NONE) in join_append_data()
1055 if (c == dialect->quotechar) { in join_append_data()
1056 if (dialect->doublequote) in join_append_data()
1057 ADDCH(dialect->quotechar); in join_append_data()
1065 if (!dialect->escapechar) { in join_append_data()
1070 ADDCH(dialect->escapechar); in join_append_data()
1080 ADDCH(dialect->quotechar); in join_append_data()
1165 terminator_len = PyUnicode_GET_LENGTH(self->dialect->lineterminator); in join_append_lineterminator()
1173 term_kind = PyUnicode_KIND(self->dialect->lineterminator); in join_append_lineterminator()
1174 term_data = PyUnicode_DATA(self->dialect->lineterminator); in join_append_lineterminator()
1191 DialectObj *dialect = self->dialect; in csv_writerow() local
1207 switch (dialect->quoting) { in csv_writerow()
1249 if (dialect->quoting == QUOTE_NONE) { in csv_writerow()
1316 { "dialect", T_OBJECT, W_OFF(dialect), READONLY },
1324 Py_XDECREF(self->dialect); in Writer_dealloc()
1334 Py_VISIT(self->dialect); in Writer_traverse()
1342 Py_CLEAR(self->dialect); in Writer_clear()
1392 PyObject * output_file, * dialect = NULL; in csv_writer() local
1399 self->dialect = NULL; in csv_writer()
1407 if (!PyArg_UnpackTuple(args, "", 1, 2, &output_file, &dialect)) { in csv_writer()
1418 self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); in csv_writer()
1419 if (self->dialect == NULL) { in csv_writer()
1440 PyObject *dialect; in csv_register_dialect() local
1451 dialect = _call_dialect(dialect_obj, kwargs); in csv_register_dialect()
1452 if (dialect == NULL) in csv_register_dialect()
1454 if (PyDict_SetItem(_csvstate_global->dialects, name_obj, dialect) < 0) { in csv_register_dialect()
1455 Py_DECREF(dialect); in csv_register_dialect()
1458 Py_DECREF(dialect); in csv_register_dialect()