diff options
Diffstat (limited to 'Include/compile.h')
-rw-r--r-- | Include/compile.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Include/compile.h b/Include/compile.h index de1b579..56973cd 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -1,9 +1,3 @@ -#ifndef Py_COMPILE_H -#define Py_COMPILE_H -#ifdef __cplusplus -extern "C" { -#endif - /*********************************************************** Copyright (c) 2000, BeOpen.com. Copyright (c) 1995-2000, Corporation for National Research Initiatives. @@ -16,22 +10,28 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. /* Definitions for bytecode */ +#ifndef Py_COMPILE_H +#define Py_COMPILE_H +#ifdef __cplusplus +extern "C" { +#endif + /* Bytecode object */ typedef struct { - PyObject_HEAD - int co_argcount; /* #arguments, except *args */ - int co_nlocals; /* #local variables */ - int co_stacksize; /* #entries needed for evaluation stack */ - int co_flags; /* CO_..., see below */ - PyObject *co_code; /* instruction opcodes */ - PyObject *co_consts; /* list (constants used) */ - PyObject *co_names; /* list of strings (names used) */ - PyObject *co_varnames; /* tuple of strings (local variable names) */ - /* The rest doesn't count for hash/cmp */ - PyObject *co_filename; /* string (where it was loaded from) */ - PyObject *co_name; /* string (name, for reference) */ - int co_firstlineno; /* first source line number */ - PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ + PyObject_HEAD + int co_argcount; /* #arguments, except *args */ + int co_nlocals; /* #local variables */ + int co_stacksize; /* #entries needed for evaluation stack */ + int co_flags; /* CO_..., see below */ + PyObject *co_code; /* instruction opcodes */ + PyObject *co_consts; /* list (constants used) */ + PyObject *co_names; /* list of strings (names used) */ + PyObject *co_varnames; /* tuple of strings (local variable names) */ + /* The rest doesn't count for hash/cmp */ + PyObject *co_filename; /* string (where it was loaded from) */ + PyObject *co_name; /* string (name, for reference) */ + int co_firstlineno; /* first source line number */ + PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; /* Masks for co_flags above */ @@ -48,11 +48,11 @@ extern DL_IMPORT(PyTypeObject) PyCode_Type; /* Public interface */ struct _node; /* Declare the existence of this type */ -DL_IMPORT(PyCodeObject *) PyNode_Compile Py_PROTO((struct _node *, char *)); -DL_IMPORT(PyCodeObject *) PyCode_New Py_PROTO(( +DL_IMPORT(PyCodeObject *) PyNode_Compile(struct _node *, char *); +DL_IMPORT(PyCodeObject *) PyCode_New( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, - PyObject *, PyObject *, int, PyObject *)); /* same as struct above */ -DL_IMPORT(int) PyCode_Addr2Line Py_PROTO((PyCodeObject *, int)); + PyObject *, PyObject *, int, PyObject *); /* same as struct above */ +DL_IMPORT(int) PyCode_Addr2Line(PyCodeObject *, int); /* for internal use only */ #define _PyCode_GETCODEPTR(co, pp) \ |