[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Setter methods for names/types of a struct type
From: |
Konstantinos Chasialis |
Subject: |
[PATCH] Setter methods for names/types of a struct type |
Date: |
Sat, 6 Jun 2020 15:24:59 +0300 |
User-agent: |
SquirrelMail/1.4.23 [email.uoa.gr] |
Hello, I've added more methods on our pk-val.c interface.
Αs the need to set a ftype/fname of a struct_type arose, I have added the
corresponding functions on pk-val.c
Also, I've added pk_alloc and pk_assert, if thats ok.
Author: kostasch <sdi1600195@di.uoa.gr>
Date: Sat Jun 6 15:19:39 2020 +0300
diff --git a/libpoke/libpoke.h b/libpoke/libpoke.h
index bd829ff5..0574228a 100644
--- a/libpoke/libpoke.h
+++ b/libpoke/libpoke.h
@@ -20,7 +20,7 @@
#define LIBPOKE_H
+#include <stdio.h>
+void *pk_alloc (size_t size);
+
+void pk_assert (int expression);
- TYPE is a type PK value specifying the type of the array.
+ TYPE is a type PK value specifying the type of the struct.
+
+/* Set the type of a field the struct type.
+
+ TYPE is the struct type.
+
+ IDX is the index of the field in the struct type.
+
+ TYPE is the type of the field in the struct type. */
+
+void pk_struct_type_set_ftype (pk_val sct_type, uint64_t idx, pk_val type);
+
+/* Set the name of a field the struct type.
+
+ TYPE is the struct type.
+
+ IDX is the index of the field in the struct type.
+
+ NAME is a string containing the name of the field in the struct type. */
+void pk_struct_type_set_fname (pk_val sct_type, uint64_t idx, pk_val name);
- [PATCH] Setter methods for names/types of a struct type,
Konstantinos Chasialis <=