make sure SWI atom constants are typed as atom_t

This commit is contained in:
Vítor Santos Costa 2011-10-21 23:06:17 +01:00
parent 8d4c9160eb
commit 5d0eed5eb1
3 changed files with 867 additions and 866 deletions

View File

@ -29,6 +29,7 @@ static char SccsId[] = "%W% %G%";
#include "alloc.h"
#include "clause.h"
#include "Foreign.h"
#include "SWI-Prolog.h"
#ifdef LOW_LEVEL_TRACER
#include "tracer.h"

File diff suppressed because it is too large Load Diff

View File

@ -35,14 +35,14 @@ gen_defs(Inp,Out) :-
NPos is Pos+1,
nb_setval(atom_counter, NPos),
number_codes(Pos, Val),
append(["#define ATOM_",Atom," (",Val,"*2+1)"], Out).
append(["#define ATOM_",Atom," ((atom_t)(",Val,"*2+1))"], Out).
gen_defs(Inp,Out) :-
split(Inp," ",["F",Functor,Arity]), !,
nb_getval(functor_counter, Pos),
NPos is Pos+1,
nb_setval(functor_counter, NPos),
number_codes(Pos, Val),
append(["#define FUNCTOR_",Functor,Arity," (",Val,"*4+2)"], Out).
append(["#define FUNCTOR_",Functor,Arity," ((functor_t)(",Val,"*4+2))"], Out).
gen_init(Inp,Out) :-