From: Chris Uzdavinis Date: 2001-08-17T07:17:35+09:00 Subject: [ruby-talk:19923] Re: Why the " * volatile " declarations in the C source? Aaron Harsh writes: > Sorry in advance if this is a stupid question, but... > > I noticed a lot of pointers in the C source being declared as '* > volatile'. For example, this declaration at the top of rb_eval in > eval.c: > > NODE * volatile node = n; > > So I'm stumped, and I'm losing sleep over this. What's the real reason? The pointer is volatile because it's an automatic variable, and that's the only way to ensure that the original value (at the time setjmp was called) is not rolled back after a longjmp. (The current value is maintained.) BTW, longjmp is how Ruby implements exceptions. -- Chris