From FCordoba@chiinc.com Wed Oct 10 19:06:09 2001
Received: from pa.CHIINC.COM (Helene.chiinc.com [207.106.30.6] (may be forged))
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f9AH68t04588
	for <prolog@swi.psy.uva.nl>; Wed, 10 Oct 2001 19:06:08 +0200 (MET DST)
Received: by pa.CHIINC.COM with Internet Mail Service (5.5.2653.19)
	id <4GYSAPCN>; Wed, 10 Oct 2001 13:11:19 -0400
Message-ID: <E8243264102C7348B37A8C0C904437397E30E9@pa.CHIINC.COM>
From: FCordoba@chiinc.com
To: prolog@swi.psy.uva.nl
Date: Wed, 10 Oct 2001 13:11:09 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Subject: [SWIPL] C++ and Prolog

Hello,

In reviewing the SWI-cpp.h header file I found
that in the PlTermv class, the PlTermv(PlTerm m0, PlTerm m1, ...)
constructors are coded as, for instance:

   __inline PlTermv::PlTermv(PlTerm m0, PlTerm m1, PlTerm m2) {
      size = 3;
      a0 = PL_new_term_refs(3);
      PL_put_term(a0+0, m0);
      PL_put_term(a0+1, m1);
      PL_put_term(a0+2, m2);
   }

Should not this be?

  __inline PlTermv::PlTermv(PlTerm m0, PlTerm m1, PlTerm m2) {
      size = 3;
      a0 = PL_new_term_refs(3);
      PL_put_term(a0+0, m0.ref);
      PL_put_term(a0+1, m1.ref);
      PL_put_term(a0+2, m2.ref);
   }

Thanks for your help.

Frank Cordoba
Research Engineer
CHI Systems Inc.
U.S.A.

