OSDN Git Service

typedef FTW
authorSimon Forman <sforman@hushmail.com>
Mon, 20 Feb 2023 04:06:07 +0000 (20:06 -0800)
committerSimon Forman <sforman@hushmail.com>
Mon, 20 Feb 2023 04:06:07 +0000 (20:06 -0800)
implementations/C/joy.h

index b39c263..de5c22f 100644 (file)
@@ -42,14 +42,14 @@ typedef struct {
 
 typedef JoyType* JoyTypePtr;
 
-struct list_node {
+typedef struct list_node {
        JoyTypePtr head;
        JoyList tail;
-};
+} JoyListNode;
 
 #define EMPTY_LIST (JoyList)NULL
 
-#define newJoyList GC_malloc(sizeof(struct list_node))
+#define newJoyList GC_malloc(sizeof(JoyListNode))
 #define newJoyType GC_malloc(sizeof(JoyType))