From: Jamis Buck Date: 2004-10-29T06:38:01+09:00 Subject: Re: Dereferencing PtrData in Ruby/DL Jamis Buck wrote: > Carl Youngblood wrote: > >> Thanks Jamis. Now I have another problem. How do I get a pointer to >> a pointer? Let's say I've just allocated a pointer with: >> >> mypointer = DL.malloc(DL.sizeof('P')) >> >> How do I get a pointer to that pointer? mypointer.to_p doesn't seem >> to work. > > > Try "mypointer.ptr". > > Then "mypointer.ref" to dereference the pointer. Ack. Other way around. PtrData#ptr dereferences a pointer, while PtrData#ref obtains a pointer to the pointer in question. - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis