Re: Inconsistency between the declaration of three function prototypes in header file gprolog.h and atom.h
Daniel Diaz <[email protected]> Mon, 06 Oct 2014 16:56:30 +0200
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============8978022488077703634==
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dwindows-1252"
http-equiv=3D"Content-Type">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Hi,<br>
<br>
I see. In this case maybe it is better to include this:<br>
<br>
#include "engine_pl.h"<br>
#include "bips_pl.h"<br>
<br>
(bips_pl.h is in BipsPl, maybe you need to pass -I<some prefix
like ..>/BipsPl to your C compiler.<br>
<br>
Daniel<br>
<br>
<br>
Le 06/10/2014 16:47, Gustavo Brown - INCO a =E9crit=A0:<br>
</div>
<blockquote
cite=3D"mid:87E2A24CB6154BC2B722046BA8811133@VirtualXP99969"
type=3D"cite">
<meta content=3D"text/html; charset=3Dwindows-1252"
http-equiv=3D"Content-Type">
<meta name=3D"GENERATOR" content=3D"MSHTML 8.00.6001.23588">
<style></style>
<div><font face=3D"Arial" size=3D"2">I am including gprolog.h and
engine_pl.h which in turn itself includes=A0atom.h</font></div>
<div><font face=3D"Arial" size=3D"2">The reason to include engine_p=
l.h
is to access some structures of the gprolog engine (AtomInfo,
WamWord, etc) to perform some mark & sweep cleanup (GC) of
the atom table.</font></div>
<div><font face=3D"Arial" size=3D"2">However i also need=A0access t=
o
some high level functions declared in gprolog.h
(Pl_Create_Atom, etc).</font></div>
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">Regards,</font></div>
<div><font face=3D"Arial" size=3D"2">=A0=A0 Gustavo</font></div>
<blockquote style=3D"BORDER-LEFT: #000000 2px solid; PADDING-LEFT:
5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<div style=3D"FONT: 10pt arial">----- Original Message ----- </di=
v>
<div style=3D"FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color:
black"><b>From:</b> <a moz-do-not-send=3D"true"
title=3D"[email protected]"
href=3D"mailto:[email protected]">Daniel Diaz</a> </=
div>
<div style=3D"FONT: 10pt arial"><b>To:</b> <a
moz-do-not-send=3D"true" title=3D"[email protected]"
href=3D"mailto:[email protected]">Gustavo Brown - INCO</a> <=
/div>
<div style=3D"FONT: 10pt arial"><b>Cc:</b> <a
moz-do-not-send=3D"true" title=3D"[email protected]"
href=3D"mailto:[email protected]">[email protected]</a> </d=
iv>
<div style=3D"FONT: 10pt arial"><b>Sent:</b> Sunday, October 05,
2014 6:00 AM</div>
<div style=3D"FONT: 10pt arial"><b>Subject:</b> Re: Inconsistency
between the declaration of three function prototypes in header
file gprolog.h and atom.h</div>
<div><br>
</div>
Thank for this report,
<div><br>
</div>
<div>note however that normally you don=92t need to include both
gprolog.h and atom.h.</div>
<div>Can you check why do you need this ?</div>
<div><br>
</div>
<div>Daniel</div>
<div><br>
</div>
<div><br>
<div>
<div>Le 2 oct. 2014 =E0 20:06, Gustavo Brown - INCO <<a
moz-do-not-send=3D"true" href=3D"mailto:[email protected]=
y">[email protected]</a>>
a =E9crit :</div>
<br class=3D"Apple-interchange-newline">
<blockquote type=3D"cite">
<div style=3D"TEXT-TRANSFORM: none; TEXT-INDENT: 0px; FONT:
16px LucidaGrande; WHITE-SPACE: normal; LETTER-SPACING:
normal; WORD-SPACING: 0px; -webkit-text-stroke-width:
0px" bgcolor=3D"#ffffff">
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">Hi,</font></div>
<div><font face=3D"Arial" size=3D"2">=A0There is an
inconsistency between the declaration of function
prototypes in header file gprolog.h</font></div>
<div><font face=3D"Arial" size=3D"2">=A0=A0=A0 int
Pl_Create_Atom(const char *atom)</font></div>
<div><font face=3D"Arial" size=3D"2">=A0=A0=A0 int
Pl_Create_Allocate_Atom(const char *atom)</font></div=
>
<div><font face=3D"Arial" size=3D"2">=A0=A0=A0 int
Pl_Find_Atom(const char *atom)</font></div>
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">and the declaration =
of
the same function prototypes in atom.h, in which the
argument (atom) is not const.</font></div>
<div><font face=3D"Arial" size=3D"2">The definition of th=
ose
functions (in atom.c) do not have the argument
marked as const either.</font></div>
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">This gives an error
when compiling a project which includes gprolog.h
with Visual Studio 2008 (second C linkage of
overloaded function XXX not allowed).</font></div>
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">Machine using: Windo=
ws
7</font></div>
<div><font face=3D"Arial" size=3D"2">GNU Prolog version
1.4.4</font></div>
<div>=A0</div>
<div><font face=3D"Arial" size=3D"2">Regards,</font></div=
>
<div><font face=3D"Arial" size=3D"2">=A0=A0 Gustavo</font=
></div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</blockquote>
<br>
<br>--=20
<br>Ce message a été vérifié par
<a href=3D"http://www.mailscanner.info/">MailScanner</a>
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
</body>
</html>
--===============8978022488077703634==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Bug-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-prolog
--===============8978022488077703634==--