Re: Using handles with C++

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 26 Feb 2003 08:32:34 PM GMT
Message-ID: <3E5D2462.AD1B159E@icparc.ic.ac.uk>
Christian Fritz wrote:
> 
> Hello!
> 
> As described in the embedding manual we are trying to pass generic C++
> data to ECLiPSe. We are facing two problems:
> 
> 1. The struct type (t_ext_type) for setting up a proper method table is
> differently defined (in types.h and eclipse_cc.h) from what is said in
> the manual. As far as we can see, it is for pure C programming (using
> pword instead of EC_word..).

It will probably work anyway (but I haven't verified this).


> 
> 2. After getting a handle we'd like to store it somewhere in eclipse for
> further accessing the data. We are able to obtain a handle and xget some
> data. But when trying to save this handle (e.g. assert(
> myHandle(Hbound)) ) and recalling it (myHandle(Hyet_unbound)), we
> immediately receive a segmentation violation.

You need to provide a copy-method for this to work. It seems that
assert/1 erroneously does not detect this problem.
Try setval/getval instead of assert, and make sure you have a copy-
function defined.


> 
> Can anybody help us with these issues? We'd be very happy.
> Thanks in advance
> Christian Fritz
> 
> ps: we are using Eclipse 5.5 on Linux (RedHat 8)


-- 
 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
 Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Wed Feb 26 20:32:40 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:22 PM GMT GMT