newlisp crashing in 'new' function
Posted: Thu Dec 03, 2009 2:42 am
I've discovered an odd crash in newlisp 10.1.6 that's causing me grief:
What's going on, why is it crashing?
To get around this I tried placing the constant declarations outside the context Foo by context-qualifying them to be in the Foo class:
But the function 'constant' won't let you do that (on a separate note, can that be changed too?).
Edit: this crash also happens if I use 'set' instead of 'constant'.
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'.