make sure SWI atom constants are typed as atom_t
This commit is contained in:
parent
8d4c9160eb
commit
5d0eed5eb1
1
C/init.c
1
C/init.c
@ -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"
|
||||
|
1728
include/dswiatoms.h
1728
include/dswiatoms.h
File diff suppressed because it is too large
Load Diff
@ -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) :-
|
||||
|
Reference in New Issue
Block a user