]> Kevux Git Server - fll/commitdiff
Update: Use F_number_t_size_positive_d for F_string_t_size_d and update #ifdef struct...
authorKevin Day <thekevinday@gmail.com>
Mon, 17 Jan 2022 02:54:59 +0000 (20:54 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 17 Jan 2022 02:54:59 +0000 (20:54 -0600)
level_0/f_string/c/string-common.h
level_0/f_type/c/type.h

index 479bc0a7f0cabb837c6b6be3a33202eb2c06108a..5fef2fe5f1e222bcef274afb038fc9f415eefecc 100644 (file)
@@ -48,8 +48,7 @@ extern "C" {
   #define macro_f_string_t_delete_simple(string, length)  f_memory_resize(length, 0, sizeof(f_string_t), (void **) & string);
   #define macro_f_string_t_destroy_simple(string, length) f_memory_adjust(length, 0, sizeof(f_string_t), (void **) & string);
 
-  // @fixme update all code utilizing f_array_length_t on a string, such as strnlen().
-  #define F_string_t_size_d F_type_size_64_positive_d
+  #define F_string_t_size_d F_number_t_size_positive_d
 #endif // _di_f_string_t_
 
 /**
index c3fa197391ad95c5639f6c0d25f5b73e724d3ed4..d466556f55378cc70cb3cc5d5e7e7129993ac244 100644 (file)
@@ -223,7 +223,7 @@ extern "C" {
  * This is intended to be used in buffers, such as strings, and in argument parameters.
  *
  * Provides additional custom types so that it can be more easily be overwritten.
- * Specifically, there is support for using 32-bit, 64-bit or 128-bit lengths.
+ * Specifically, there is support for using 32-bit, 64-bit, or 128-bit lengths.
  *
  * 64-bit is the designed default.
  */
@@ -238,9 +238,7 @@ extern "C" {
   #define F_number_t_size_max_unsigned_d F_type_size_max_64_unsigned_d
   #define F_number_t_size_max_positive_d F_type_size_max_64_positive_d
   #define F_number_t_size_max_negative_d F_type_size_max_64_negative_d
-#endif // _di_f_type_number_64_t_
-
-#ifdef _en_f_type_number_32_t_
+#elif defined(_en_f_type_number_32_t_)
   typedef int32_t  f_number_signed_t;
   typedef uint32_t f_number_unsigned_t;
 
@@ -251,9 +249,7 @@ extern "C" {
   #define F_number_t_size_max_unsigned_d F_type_size_max_32_unsigned_d
   #define F_number_t_size_max_positive_d F_type_size_max_32_positive_d
   #define F_number_t_size_max_negative_d F_type_size_max_32_negative_d
-#endif // _en_f_type_number_32_t_
-
-#ifdef _en_f_type_number_128_t_
+#elif defined(_en_f_type_number_128_t_)
   typedef f_int_128_t  f_number_signed_t;
   typedef f_uint_128_t f_number_unsigned_t;