From: Dave Burt Date: 2004-10-29T19:53:58+09:00 Subject: Re: Dereferencing PtrData in Ruby/DL "Tim Sutherland" wrote... >>Ack. Other way around. PtrData#ptr dereferences a pointer, while >>PtrData#ref obtains a pointer to the pointer in question. > > What do you think of the following patch to dl/doc/dl.txt? The first time > I > used PtrData#ptr and PtrData#ref I had to look in the source code to see > what they did. > > --- dl.txt Sun Jan 12 06:28:59 2003 > +++ dl-new.txt Fri Oct 29 13:09:28 2004 > @@ -198,10 +198,12 @@ > string is '\0'. > > * ptr = PtrData#ptr,+@ > - * returns the pointed value as a PtrData object ptr. > + * returns the dereferenced value as a PtrData object ptr. > + this is like `*ptr' in C. > > * ptr = PtrData#ref,-@ > * returns the reference as a PtrData object ptr. > + this is like `&ptr' in C. > > * ptr = PtrData#+ > * returns the PtrData object Much better. +1