summary refs log tree commit diff stats
path: root/compiler/condsyms.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/condsyms.nim')
-rw-r--r--compiler/condsyms.nim11
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim
index 9a4c1701c..5e7ce3a08 100644
--- a/compiler/condsyms.nim
+++ b/compiler/condsyms.nim
@@ -15,26 +15,21 @@ import
 from options import Feature
 from lineinfos import HintsToStr, WarningsToStr
 
-const
-  catNone = "false"
-
 proc defineSymbol*(symbols: StringTableRef; symbol: string, value: string = "true") =
   symbols[symbol] = value
 
 proc undefSymbol*(symbols: StringTableRef; symbol: string) =
-  symbols[symbol] = catNone
+  symbols.del(symbol)
 
 #proc lookupSymbol*(symbols: StringTableRef; symbol: string): string =
 #  result = if isDefined(symbol): gSymbols[symbol] else: nil
 
 iterator definedSymbolNames*(symbols: StringTableRef): string =
   for key, val in pairs(symbols):
-    if val != catNone: yield key
+    yield key
 
 proc countDefinedSymbols*(symbols: StringTableRef): int =
-  result = 0
-  for key, val in pairs(symbols):
-    if val != catNone: inc(result)
+  symbols.len
 
 proc initDefines*(symbols: StringTableRef) =
   # for bootstrapping purposes and old code: