]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/dinput/constants/constants.factor
Specialized array overhaul
[factor.git] / basis / windows / dinput / constants / constants.factor
index ec70a3cdd621be386fd3b5e48cef9f7e3b568db7..e0bfafc5c4e7adad2ef12e8af00c5d73a0a84519 100755 (executable)
@@ -2,7 +2,8 @@ USING: windows.dinput windows.kernel32 windows.ole32 windows.com
 windows.com.syntax alien alien.c-types alien.syntax kernel system namespaces
 combinators sequences fry math accessors macros words quotations
 libc continuations generalizations splitting locals assocs init
-struct-arrays memoize classes.struct ;
+specialized-arrays memoize classes.struct ;
+SPECIALIZED-ARRAY: DIOBJECTDATAFORMAT
 IN: windows.dinput.constants
 
 ! Some global variables aren't provided by the DirectInput DLL (they're in the
@@ -49,7 +50,7 @@ MEMO: heap-size* ( c-type -- n ) heap-size ;
     DIOBJECTDATAFORMAT <struct-boa> ;
 
 :: malloc-DIOBJECTDATAFORMAT-array ( struct array -- alien )
-    [let | alien [ array length DIOBJECTDATAFORMAT malloc-struct-array ] |
+    [let | alien [ array length malloc-DIOBJECTDATAFORMAT-array ] |
         array [| args i |
             struct args <DIOBJECTDATAFORMAT>
             i alien set-nth