[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Setter methods for names/types of a struct type
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] Setter methods for names/types of a struct type |
Date: |
Fri, 26 Jun 2020 12:15:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
[Sorry for the delay on replying to this.]
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);
I can't see why we would want to provide these services in libpoke...
- 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.
"in a 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.
"in a 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);
The patch is missing the changes in pk-val.c.
Can you please re-submit?
Thanks!