Created
December 17, 2008 17:07
-
-
Save mrjbq7/37133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USING: alien.syntax alien.c-types byte-arrays kernel strings ; | |
IN: uuid | |
LIBRARY: uuid | |
FUNCTION: void uuid_generate ( char[16] out ) ; | |
FUNCTION: void uuid_unparse ( char[16] out, char* out ) ; | |
: uuid ( -- string ) | |
16 "char" <c-array> dup uuid_generate | |
36 <byte-array> [ uuid_unparse ] keep >string ; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment