summaryrefslogtreecommitdiff
path: root/env.h
blob: fbb7ebd196fa266452a24b47c5523f0c91a2d4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/************************************************

  env.h -

  $Author: matz $
  $Revision: 1.4 $
  $Date: 1994/10/14 06:19:14 $
  created at: Mon Jul 11 11:53:03 JST 1994

************************************************/
#ifndef ENV_H
#define ENV_H

extern struct ENVIRON {
    VALUE self;
    int argc;
    VALUE *argv;
    struct RClass *current_module;
    struct RClass *last_class;
#ifdef USE_CALLER
    char *file;
    int line;
#endif
    ID last_func;
    ID *local_tbl;
    VALUE *local_vars;
    int in_eval;
    struct BLOCK *block;
    int iterator;
    int flags;
    struct ENVIRON *prev;
} *the_env;

#define ITERATOR_P() (the_env->iterator == 1 || the_env->iterator == 2)

#undef Qself
#define Qself the_env->self
#define the_class the_env->current_module

#define DURING_ITERATE  1
#define DURING_RESQUE   2
#define DURING_CALL     4
#define VARS_MALLOCED   8

#endif /* ENV_H */