Staging
v0.5.1
https://github.com/python/cpython
Revision 08bc84c8dac5d866728ff90c38f62d2e6792276b authored by Barry Warsaw on 03 February 2006, 04:41:24 UTC, committed by Barry Warsaw on 03 February 2006, 04:41:24 UTC
acceptable to Python 2.4's time.strftime().  This fix mirrors the behavior in
email 3.0.  That field is documented as being "not useable" so it might as
well not be buggy too <wink>.

Add a test for this behavior and update a few tests that were expecting a 0 in
this field.  After committing I will run the entire Python 2.3 test suite to
ensure this doesn't break any Python tests.
1 parent 9b55f08
Raw File
Tip revision: 08bc84c8dac5d866728ff90c38f62d2e6792276b authored by Barry Warsaw on 03 February 2006, 04:41:24 UTC
parsedate_tz(): Return a 1 in the tm_yday field so that the value is
Tip revision: 08bc84c
node.h

/* Parse tree node interface */

#ifndef Py_NODE_H
#define Py_NODE_H
#ifdef __cplusplus
extern "C" {
#endif

typedef struct _node {
    short		n_type;
    char		*n_str;
    int			n_lineno;
    int			n_nchildren;
    struct _node	*n_child;
} node;

PyAPI_FUNC(node *) PyNode_New(int type);
PyAPI_FUNC(int) PyNode_AddChild(node *n, int type,
                                      char *str, int lineno);
PyAPI_FUNC(void) PyNode_Free(node *n);

/* Node access functions */
#define NCH(n)		((n)->n_nchildren)
#define CHILD(n, i)	(&(n)->n_child[i])
#define TYPE(n)		((n)->n_type)
#define STR(n)		((n)->n_str)

/* Assert that the type of a node is what we expect */
#define REQ(n, type) assert(TYPE(n) == (type))

PyAPI_FUNC(void) PyNode_ListTree(node *);

#ifdef __cplusplus
}
#endif
#endif /* !Py_NODE_H */
back to top