1 /*
2  * Copyright 2001-2004 David Abrahams.
3  * Distributed under the Boost Software License, Version 1.0.
4  * (See accompanying file LICENSE_1_0.txt or copy at
5  * http://www.boost.org/LICENSE_1_0.txt)
6  */
7 
8 #ifndef FRAMES_DWA20011021_H
9 #define FRAMES_DWA20011021_H
10 
11 #include "config.h"
12 #include "lists.h"
13 #include "modules.h"
14 #include "object.h"
15 
16 
17 typedef struct frame FRAME;
18 
19 struct frame
20 {
21     FRAME      * prev;
22     FRAME      * prev_user;  /* The nearest enclosing frame for which
23                                 module->user_module is true. */
24     LOL          args[ 1 ];
25     module_t   * module;
26     OBJECT     * file;
27     int          line;
28     char const * rulename;
29 #ifdef JAM_DEBUGGER
30     void       * function;
31 #endif
32 };
33 
34 
35 /* When a call into Python is in progress, this variable points to the bjam
36  * frame that was current at the moment of the call. When the call completes,
37  * the variable is not defined. Furthermore, if Jam calls Python which calls Jam
38  * and so on, this variable only keeps the most recent Jam frame.
39  */
40 extern FRAME * frame_before_python_call;
41 
42 
43 void frame_init( FRAME * );
44 void frame_free( FRAME * );
45 
46 #endif
47