Re: EuGL alpha 1 release
- Posted by Adam Weeden <adam_weeden at HOTMAIL.COM> Mar 07, 2000
- 553 views
> <heresy> > Wouldn't it be nice if, when Rob implements namespaces, he could > somehow allow _direct_ calls to C routines, so we could do away with > all that c_func() and c_proc() stuff. > </heresy> > It's not that I like c, but it looks like using c calls is going to be > unavoidable > if we intend to use any graphics or windowing library. > > Regards, > Irv I've actually thought of a nice way for library builders to make libraries more user friendly. (Not sure how original this is, but I have never seen it doen, it seems quite obvious to me). Say you have a mydll.dll with a c_func in it called mycfunc that takes two parameters of C_INT and returns a C_INT. mydll = open_dll("mydll.dll") cfunc1 = define_c_func(mydll, "mycfunc", {C_INT, C_INT}, C_INT} global function mycfunc(integer first, integer second) return c_func(cfunc1 , {first, second}) end function We can now call mycfunc as if it was just a regular function. No more user playing around with c_func and c_proc. Just an idea. Adam Weeden