[Kostas asks about whether you can write classes whose methods are
dynamically loaded C code.]

Ahh, native methods. :-)

*Officially*, methods are not variables at the present time; your method
can call a dynamically loaded C function.

method Cnext_hops(args[])
static f
initial {
   f := loadfunc("./libCnexthops.so", "Cnext_hops")
   }
   return f ! args  # or maybe f ! (push(self, args)) if f needs "self"
end

UNofficially, you might try

method Cnext_hops(args[])
   return (self.__m.Cnext_hops :=
           loadfunc("./libCnexthops.so", "Cnext_hops")) ! (push(self,args))
end

Note that this trick works in the current implementation but the __m access
to the methods vector is not guaranteed to never change.  And, your C
function must be expecting the "self" object as its first parameter if you
use this trick, since method invocation passes o as a first parameter.

Clint





-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to