annotate Include/structseq.h @ 60174:255a401c19b0

(partially) Merged revisions 79534,79537,79539,79558,79606 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79534 | florent.xicluna | 2010-03-31 23:21:54 +0200 (mer, 31 mar 2010) | 2 lines Fix test for xml.etree when using a non-ascii path. And use check_warnings instead of catch_warnings. ........ r79537 | florent.xicluna | 2010-03-31 23:40:32 +0200 (mer, 31 mar 2010) | 2 lines Fix typo ........ r79539 | florent.xicluna | 2010-04-01 00:01:03 +0200 (jeu, 01 avr 2010) | 2 lines Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests. ........ r79558 | florent.xicluna | 2010-04-01 20:17:09 +0200 (jeu, 01 avr 2010) | 2 lines #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote. ........ r79606 | florent.xicluna | 2010-04-02 19:26:42 +0200 (ven, 02 avr 2010) | 2 lines Backport some robotparser test and skip the test if the external resource is not available. ........
author Florent Xicluna <florent.xicluna@gmail.com>
date Fri, 02 Apr 2010 18:52:12 +0000
parents e1a36559d8b6
children cab14be0ada1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20539
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
1
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 /* Tuple object interface */
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
3
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 #ifndef Py_STRUCTSEQ_H
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 #define Py_STRUCTSEQ_H
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 #ifdef __cplusplus
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 extern "C" {
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 #endif
25824
1afb228e4265 Clean up some whitespace to be consistent with Python's C style.
Fred Drake <fdrake@acm.org>
parents: 25806
diff changeset
9
20539
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 typedef struct PyStructSequence_Field {
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 char *name;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 char *doc;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 } PyStructSequence_Field;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 typedef struct PyStructSequence_Desc {
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 char *name;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 char *doc;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 struct PyStructSequence_Field *fields;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 int n_in_sequence;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 } PyStructSequence_Desc;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
21
25806
0bbea4dcd9be Add PyStructSequence_UnnamedField. Add stat_float_times.
Martin v. Löwis <martin@v.loewis.de>
parents: 24752
diff changeset
22 extern char* PyStructSequence_UnnamedField;
0bbea4dcd9be Add PyStructSequence_UnnamedField. Add stat_float_times.
Martin v. Löwis <martin@v.loewis.de>
parents: 24752
diff changeset
23
25824
1afb228e4265 Clean up some whitespace to be consistent with Python's C style.
Fred Drake <fdrake@acm.org>
parents: 25806
diff changeset
24 PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
1afb228e4265 Clean up some whitespace to be consistent with Python's C style.
Fred Drake <fdrake@acm.org>
parents: 25806
diff changeset
25 PyStructSequence_Desc *desc);
1afb228e4265 Clean up some whitespace to be consistent with Python's C style.
Fred Drake <fdrake@acm.org>
parents: 25806
diff changeset
26
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20539
diff changeset
27 PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
20539
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
28
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
29 typedef struct {
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 PyObject_VAR_HEAD
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
31 PyObject *ob_item[1];
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 } PyStructSequence;
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
33
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
34 /* Macro, *only* to be used to fill in brand new objects */
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
35 #define PyStructSequence_SET_ITEM(op, i, v) \
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
36 (((PyStructSequence *)(op))->ob_item[i] = v)
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
37
42796
e1a36559d8b6 Remove PyArg_Parse usage from time module. (An extra set of eyeballs on
Skip Montanaro <skip@pobox.com>
parents: 25824
diff changeset
38 #define PyStructSequence_GET_ITEM(op, i) \
e1a36559d8b6 Remove PyArg_Parse usage from time module. (An extra set of eyeballs on
Skip Montanaro <skip@pobox.com>
parents: 25824
diff changeset
39 (((PyStructSequence *)(op))->ob_item[i])
e1a36559d8b6 Remove PyArg_Parse usage from time module. (An extra set of eyeballs on
Skip Montanaro <skip@pobox.com>
parents: 25824
diff changeset
40
e1a36559d8b6 Remove PyArg_Parse usage from time module. (An extra set of eyeballs on
Skip Montanaro <skip@pobox.com>
parents: 25824
diff changeset
41
20539
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 #ifdef __cplusplus
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
43 }
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 #endif
2d599a36b67a SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 #endif /* !Py_STRUCTSEQ_H */