]> gitweb.factorcode.org Git - factor.git/commitdiff
unicode.script: change to use a constant instead of a global.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 21:29:16 +0000 (14:29 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 21:29:16 +0000 (14:29 -0700)
basis/unicode/script/script.factor

index d17f3b0a03ccdbd7dc48218c23313ee0528e2ef7..d973f8f7128583a76f3c70ac25257184e9a8e092 100644 (file)
@@ -1,16 +1,18 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: interval-maps namespaces simple-flat-file ;
+USING: interval-maps namespaces parser simple-flat-file
+words.constant ;
 IN: unicode.script
 
 <PRIVATE
 
-SYMBOL: script-table
-
+<<
+"script-table" create-in
 "vocab:unicode/script/Scripts.txt" load-interval-file
-script-table set-global
+define-constant
+>>
 
 PRIVATE>
 
 : script-of ( char -- script )
-    script-table get-global interval-at ;
+    script-table interval-at ;