ソースを参照

Added static inline function MHD_lib_get_fixed_info_bool()

Evgeny Grin (Karlson2k) 1 年間 前
コミット
9eaec1c928
2 ファイル変更38 行追加0 行削除
  1. 19 0
      src/include/microhttpd2.h
  2. 19 0
      src/include/microhttpd2_main.h.in

+ 19 - 0
src/include/microhttpd2.h

@@ -9036,6 +9036,25 @@ MHD_lib_get_info_ver_num (void)
   return data.v_uint32;
 }
 
+
+MHD_STATIC_INLINE_END_
+/**
+ * Get the fixed boolean information about the library.
+ * @param info the type of requested information, must be the value with
+ *             the boolean resulting data; behaviour is undefined if other
+ *             types of requested information is used
+ * @return #MHD_YES or #MHD_NO
+ */
+MHD_STATIC_INLINE_ MHD_FN_PURE_ enum MHD_Bool
+MHD_lib_get_fixed_info_bool (enum MHD_LibInfoFixed info_type)
+{
+  union MHD_LibInfoFixedData data;
+  (void) MHD_lib_get_info_fixed (info_type, \
+                                 &data); /* Never fail */
+  return data.v_bool;
+}
+
+
 MHD_STATIC_INLINE_END_
 #endif /* ! MHD_NO_STATIC_INLINE */
 

+ 19 - 0
src/include/microhttpd2_main.h.in

@@ -4414,6 +4414,25 @@ MHD_lib_get_info_ver_num (void)
   return data.v_uint32;
 }
 
+
+MHD_STATIC_INLINE_END_
+/**
+ * Get the fixed boolean information about the library.
+ * @param info the type of requested information, must be the value with
+ *             the boolean resulting data; behaviour is undefined if other
+ *             types of requested information is used
+ * @return #MHD_YES or #MHD_NO
+ */
+MHD_STATIC_INLINE_ MHD_FN_PURE_ enum MHD_Bool
+MHD_lib_get_fixed_info_bool (enum MHD_LibInfoFixed info_type)
+{
+  union MHD_LibInfoFixedData data;
+  (void) MHD_lib_get_info_fixed (info_type, \
+                                 &data); /* Never fail */
+  return data.v_bool;
+}
+
+
 MHD_STATIC_INLINE_END_
 #endif /* ! MHD_NO_STATIC_INLINE */