[hackers] [scc] Change type of mktype parameter || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 5 Aug 2015 21:57:37 +0200 (CEST)

commit 64df849f2c1cd54a41c09c553f260ecb2c793595
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 5 21:18:50 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 5 21:18:50 2015 +0200

    Change type of mktype parameter
    
    This parameter only receives Type ** data, so it is better
    use Type ** instead of void *.

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 3d9630d..5c0b281 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -289,7 +289,7 @@ extern void printerr(char *fmt, ...);
 /* types.c */
 extern bool eqtype(Type *tp1, Type *tp2);
 extern Type *ctype(unsigned type, unsigned sign, unsigned size);
-extern Type *mktype(Type *tp, unsigned op, short nelem, void *data);
+extern Type *mktype(Type *tp, unsigned op, short nelem, Type *data[]);
 extern Type *duptype(Type *base);
 
 /* symbol.c */
diff --git a/cc1/types.c b/cc1/types.c
index ddcbbc0..cceb98c 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -263,7 +263,7 @@ invalid_type:
 }
 
 Type *
-mktype(Type *tp, unsigned op, short nelem, void *data)
+mktype(Type *tp, unsigned op, short nelem, Type *pars[])
 {
         static Type *typetab[NR_TYPE_HASH];
         Type **tbl, type;
_AT_@ -284,7 +284,7 @@ mktype(Type *tp, unsigned op, short nelem, void *data)
         type.type = tp;
         type.op = op;
         type.letter = letters[op];
- type.pars = data;
+ type.pars = pars;
         type.n.elem = nelem;
         type.ns = 0;
 
Received on Wed Aug 05 2015 - 21:57:37 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 05 2015 - 22:00:13 CEST