Staging
v0.5.1
https://github.com/python/cpython
Revision a9d157a8dd7a5b2b53b60680729c320f9fd9f96c authored by Victor Stinner on 04 March 2010, 12:16:27 UTC, committed by Victor Stinner on 04 March 2010, 12:16:27 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78647 | victor.stinner | 2010-03-04 13:14:57 +0100 (jeu., 04 mars 2010) | 12 lines

  Merged revisions 78646 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78646 | victor.stinner | 2010-03-04 13:09:33 +0100 (jeu., 04 mars 2010) | 5 lines

    Issue #1054943: Fix unicodedata.normalize('NFC', text) for the Public Review
    Issue #29.

    PR #29 was released in february 2004!
  ........
................
1 parent da13545
Raw File
Tip revision: a9d157a8dd7a5b2b53b60680729c320f9fd9f96c authored by Victor Stinner on 04 March 2010, 12:16:27 UTC
Merged revisions 78647 via svnmerge from
Tip revision: a9d157a
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_col_offset;
    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, int col_offset);
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 RCHILD(n, i)	(CHILD(n, NCH(n) + 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