Code: Select all
(new Class 'Foo)
(context Foo)
(constant 'NEWLISP64 (not (zero? (& (sys-info -1) 256))))
; comment out the line below and it doesn't crash
(constant 'get-ptr (if NEWLISP64 get-long get-int))
(context MAIN)
(new Foo 'Bar) ; crash!
To get around this I tried placing the constant declarations outside the context Foo by context-qualifying them to be in the Foo class:
Code: Select all
(constant 'Foo:NEWLISP64 (not (zero? (& (sys-info -1) 256))))
Edit: this crash also happens if I use 'set' instead of 'constant'.