Browse Source

Typedef function types, not pointers

master
Causal Agent 5 months ago
parent
commit
e8063c35ec
Signed by: Curtis McEnroe <june@causal.agency> GPG Key ID: CEA2F97ADCFCD77C
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      handle.c
  2. 2
    2
      input.c

+ 2
- 2
handle.c View File

@@ -87,7 +87,7 @@ static char *dequote(char *mesg) {
87 87
 	return mesg;
88 88
 }
89 89
 
90
-typedef void (*Handler)(char *prefix, char *params);
90
+typedef void Handler(char *prefix, char *params);
91 91
 
92 92
 static void handlePing(char *prefix, char *params) {
93 93
 	(void)prefix;
@@ -483,7 +483,7 @@ static void handleNotice(char *prefix, char *params) {
483 483
 
484 484
 static const struct {
485 485
 	const char *command;
486
-	Handler handler;
486
+	Handler *handler;
487 487
 } Handlers[] = {
488 488
 	{ "001", handleReplyWelcome },
489 489
 	{ "311", handleReplyWhoisUser },

+ 2
- 2
input.c View File

@@ -47,7 +47,7 @@ param(struct Tag tag, const char *command, char **params, const char *name) {
47 47
 	return NULL;
48 48
 }
49 49
 
50
-typedef void (*Handler)(struct Tag tag, char *params);
50
+typedef void Handler(struct Tag tag, char *params);
51 51
 
52 52
 static void inputRaw(struct Tag tag, char *params) {
53 53
 	(void)tag;
@@ -170,7 +170,7 @@ static void inputMan(struct Tag tag, char *params) {
170 170
 
171 171
 static const struct {
172 172
 	const char *command;
173
-	Handler handler;
173
+	Handler *handler;
174 174
 } Commands[] = {
175 175
 	{ "/close", inputClose },
176 176
 	{ "/help", inputMan },

Loading…
Cancel
Save