summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/env.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-07-19 10:27:48 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-07-19 16:14:57 +0200
commit42ccd053e2be73e5e2a7fbf3be8643141251bb94 (patch)
tree884e9ba6f5495a9aad9f094667492ae9852917a4 /crawl-ref/source/env.h
parentdbc72c204e2b75e40397e089e08289012a8c2087 (diff)
downloadcrawl-ref-42ccd053e2be73e5e2a7fbf3be8643141251bb94.tar.gz
crawl-ref-42ccd053e2be73e5e2a7fbf3be8643141251bb94.zip
A compile option (-DDEBUG_GLOBALS) to let valgrind act on global classes.
It's not the default, even for debug builds, since it makes debugging with gdb nasty -- you have to refer to real_you->field when gdb mentions you.field. Even naming real_you just you would still force you to use "->" instead of ".".
Diffstat (limited to 'crawl-ref/source/env.h')
-rw-r--r--crawl-ref/source/env.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h
index 9d70e35b2f..3404c48f41 100644
--- a/crawl-ref/source/env.h
+++ b/crawl-ref/source/env.h
@@ -101,6 +101,9 @@ struct crawl_environment
int forest_awoken_until;
};
+#ifdef DEBUG_GLOBALS
+#define env (*real_env)
+#endif
extern struct crawl_environment env;
#endif