PengZheng commented on code in PR #727:
URL: https://github.com/apache/celix/pull/727#discussion_r1486377110
##########
libs/utils/include/celix_array_list.h:
##########
@@ -40,36 +41,83 @@
extern "C" {
#endif
+/**
+ * @enum celix_array_list_element_type_t
+ * @brief An enumeration of the types of elements that can be stored in a
Celix array list.
+ */
+typedef enum celix_array_list_element_type {
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED = 0, /**< Represents an undefined
element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_POINTER = 1, /**< Represents a pointer
element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING = 2, /**< Represents a string element
type where the array list is the owner */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING_REF =
+ 3, /**< Represents a string element type where the array list is not
the owner */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_INT = 4, /**< Represents an integer
element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_LONG = 5, /**< Represents a long integer
element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_UINT = 6, /**< Represents an unsigned
integer element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_ULONG = 7, /**< Represents an unsigned long
integer element type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_FLOAT = 8, /**< Represents a float element
type. */
+ CELIX_ARRAY_LIST_ELEMENT_TYPE_DOUBLE = 9, /**< Represents a double element
type. */
Review Comment:
If we have `double`, do we still need `float`? The same remarks apply to
`size_t`/`unsigned long`/`unsigned int`, `long`/`int`. Moreover, when use JSON
as serialization format, how to encode these (redundant) types (i.e.
differentiate between `double` and `float`)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]