aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/slice.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-05-15 11:10:26 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-05-15 11:10:26 +0400
commite69012ce2a366e54bc86cd17f2fb1d73fc567a89 (patch)
treec2f5fd88779792391945826b2cb91df9f95cbfa2 /src/pkg/runtime/slice.c
parent5a89b35bca720d1ba296f5d7f22376b440486faf (diff)
downloadgo-e69012ce2a366e54bc86cd17f2fb1d73fc567a89.tar.xz
runtime: use enums instead static vars for debugging
Compiler can detect and delete dead code with enums, but can not with static vars. R=golang-dev, dave, r CC=golang-dev https://golang.org/cl/9377043
Diffstat (limited to 'src/pkg/runtime/slice.c')
-rw-r--r--src/pkg/runtime/slice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c
index 354c54c865..d46d60f24a 100644
--- a/src/pkg/runtime/slice.c
+++ b/src/pkg/runtime/slice.c
@@ -9,7 +9,10 @@
#include "malloc.h"
#include "race.h"
-static bool debug = 0;
+enum
+{
+ debug = 0
+};
static void makeslice1(SliceType*, intgo, intgo, Slice*);
static void growslice1(SliceType*, Slice, intgo, Slice *);