interfacing with c - unification of pointers to structures

Tushar Parekh <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
hello,

i have interfaced gnu prolog and c libraries.

i am able to handle input, output arguments of simple types like string, integer.

i have a structure in c program e.g. BITMAP.  i want to return a pointer to this structure 
i.e. BITMAP * back to gnu prolog from c function.  how do i code this ?
i am working on 32 bit machine.  so all pointers are 32 bits.  i am able to handle integer output
arguments by declaring int * on c function side and setting this to the integer value and returing 
PL_TRUE to enable binding to prolog argument.  can i cast BITMAP * to INTEGER * and send it 
back to gnu prolog.  the reason i need to store this pointer on prolog side is to facilitate future calls
to c functions with this pointer supplied as an argument.


thank you in advance for any help.

regards,
tushar parekh.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.