guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how would i wrap this function in guile?


From: Ray Lehtiniemi
Subject: how would i wrap this function in guile?
Date: Wed, 19 Jan 2005 14:57:47 -0700
User-agent: Mutt/1.5.6i

hi all

i'm playing around with guile-1.6.7 and swig.  swig has given me
a start, and now i'm hacking on the generated output.  i have
created a .so object that i can load and use via

   (load-extension "/foo.so" "SWIG_init")

i have a function in a library that i would like to wrap, but am
not sure how.

  int look_up_object (char * name, void **address);

the idea is to pass a name into this function, and it will stick
the address of that object into the void*.  in the C code, you
then cast it to whatever type you "know" the object is and twiddle
the underlying memory directly.

the object can have any arbitrary C type, and the same function
is used to lookup objects of many different C types.

so can anyone suggest a strategy for wrapping this thing? what
might a nice scheme interface look like for this sort of api?




please cc me as i'm not subscribed.

thanks


ps: i'm building and running guile in a crosstool environment,
i686-linux targeting a big-endian xscale arm-linux.  if there
are known problems with this sort of setup, please let me know!!

-- 
----------------------------------------------------------------------
     Ray L   <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]