]> mj.ucw.cz Git - libucw.git/commitdiff
added CF_UNS, because (int*) and (uns*) are uncompatible pointers
authorRobert Spalek <robert@ucw.cz>
Thu, 20 Apr 2006 23:14:25 +0000 (01:14 +0200)
committerRobert Spalek <robert@ucw.cz>
Thu, 20 Apr 2006 23:14:25 +0000 (01:14 +0200)
lib/conf2-test.c
lib/conf2.h

index 3baa440dd3f3eeab055683a3529f7c04c0610a50..428150bc34d8620aab697159a58aa50a6bd79497 100644 (file)
@@ -52,7 +52,7 @@ static struct cf_section cf_sec_1 = {
 #undef F
 };
 
 #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";
 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_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),
     CF_INT_DYN("nrs1", &nrs1, 1000),
     CF_INT_ARY("nrs2", nrs2, 5),
     CF_STRING("str1", &str1),
index 2a2281ff616fdb26c67907c77119d597257227b0..0a847e7daf117025f27dd0b1fb87da6e5a8f57c5 100644 (file)
@@ -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_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)
 #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)