From 8ef9f8db115f0d0f136d3b6ebc4d3a77069ca406 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Fri, 21 Apr 2006 01:14:25 +0200 Subject: [PATCH] added CF_UNS, because (int*) and (uns*) are uncompatible pointers --- lib/conf2-test.c | 4 ++-- lib/conf2.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/conf2-test.c b/lib/conf2-test.c index 3baa440d..428150bc 100644 --- a/lib/conf2-test.c +++ b/lib/conf2-test.c @@ -52,7 +52,7 @@ static struct cf_section cf_sec_1 = { #undef F }; -static int nr1 = 15; +static uns nr1 = 15; static int *nrs1 = DYN_ALLOC(int, 5, 5, 4, 3, 2, 1); static int nrs2[5]; static byte *str1 = "no worries"; @@ -95,7 +95,7 @@ static struct cf_section cf_top UNUSED = { CF_COMMIT(init_top), CF_COMMIT(commit_top), CF_ITEMS { - CF_INT("nr1", &nr1), + CF_UNS("nr1", &nr1), CF_INT_DYN("nrs1", &nrs1, 1000), CF_INT_ARY("nrs2", nrs2, 5), CF_STRING("str1", &str1), diff --git a/lib/conf2.h b/lib/conf2.h index 2a2281ff..0a847e7d 100644 --- a/lib/conf2.h +++ b/lib/conf2.h @@ -77,6 +77,9 @@ struct clist; #define CF_INT(n,p) CF_STATIC(n,p,INT,int,1) #define CF_INT_ARY(n,p,c) CF_STATIC(n,p,INT,int,c) #define CF_INT_DYN(n,p,c) CF_DYNAMIC(n,p,INT,int,c) +#define CF_UNS(n,p) CF_STATIC(n,p,INT,uns,1) +#define CF_UNS_ARY(n,p,c) CF_STATIC(n,p,INT,uns,c) +#define CF_UNS_DYN(n,p,c) CF_DYNAMIC(n,p,INT,uns,c) #define CF_U64(n,p) CF_STATIC(n,p,U64,u64,1) #define CF_U64_ARY(n,p,c) CF_STATIC(n,p,U64,u64,c) #define CF_U64_DYN(n,p,c) CF_DYNAMIC(n,p,U64,u64,c) -- 2.39.2