From: Elias Athanasopoulos Date: 2003-12-10T03:29:56+09:00 Subject: Re: passing a func to a ruby func On Wed, Dec 10, 2003 at 12:29:36AM +0900, ts wrote: > >>>>> "e" == elathan writes: > > e> Can I export a function such as qsort() of the Linux stdlib to a Ruby > e> method. qsort() takes a C function pointer as a parameter. > > Not really understood what you want to do, but for qsort a stupid example Well, I am trying to create a ruby method call for a C++ method which takes as an argument a pointer to a user-defined function. I.e. the C++ method is like: foo (int a, int b, double (*f) (double *, double *), int c); Thanks for you qsort() example. I'll try to study it and see what I can get from. My main worry, is that the 'f' function which is passed in foo() above might be more complicated than a common Ruby block. Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky