[Top][All Lists]

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

Segfault in Mk_Proper_List

From: Olivier Teulière
Subject: Segfault in Mk_Proper_List
Date: Sun, 20 Oct 2002 05:17:58 +0200
User-agent: Mutt/1.3.28i


I get a segmentation fault when I call Mk_Proper_List from C, and I
can't find what's wrong with my program (I'm using gprolog 1.2.16).
Here is the listing, reduced to the minimum:

#include "gprolog.h"

int main_wrapper( int argc, char *argv[] )
    int i;
    PlTerm elements[8];
    PlTerm list;
    for( i = 0; i < 8; i++ )
        elements[i] = Mk_Integer( i );
    list = Mk_Proper_List( 8, elements );
    return 0;

int main( int argc, char *argv[] )
    return main_wrapper( argc, argv );

What's really strange is that Mk_Proper_List did work before I changed
the structure of my program, but I don't know what was so different...

Thanks in advance for your help,


reply via email to

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