The function, you suggested eraly isn't working anymore and always returns nil.
Code: Select all
(define (global? s)
"(global? 'sym) - return 'sym if it is global, otherwise - nil"
(let (mask (if (= (pack "d" 1) "\000\001") 0x02000000 0x00000200))
(= (& (get-int (last (dump s))) mask) mask)))