[Groonga-commit] groonga/groonga at da5444e [master] Use C99 bool for grn_bool

Zurück zum Archiv-Index
Kouhei Sutou null+****@clear*****
Tue Apr 2 16:43:19 JST 2019


Kouhei Sutou	2019-04-02 16:43:19 +0900 (Tue, 02 Apr 2019)

  Revision: da5444ea43ebbbf4678ca9dfeb7cfdcabdfc4a23
  https://github.com/groonga/groonga/commit/da5444ea43ebbbf4678ca9dfeb7cfdcabdfc4a23

  Message:
    Use C99 bool for grn_bool
    
    grn_bool is deprecated. Use bool directly.

  Modified files:
    include/groonga/groonga.h

  Modified: include/groonga/groonga.h (+6 -4)
===================================================================
--- include/groonga/groonga.h    2019-04-01 17:34:47 +0900 (a07419f59)
+++ include/groonga/groonga.h    2019-04-02 16:43:19 +0900 (2767bde7c)
@@ -20,9 +20,10 @@
 #pragma once
 
 #include <stdarg.h>
-#include <sys/types.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
+#include <sys/types.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -37,13 +38,14 @@ extern "C" {
 #endif /* GRN_API */
 
 typedef uint32_t grn_id;
-typedef uint8_t grn_bool;
+/* Deprecated since 9.0.2. Use bool directly. */
+typedef bool grn_bool;
 
 #define GRN_ID_NIL                     (0x00)
 #define GRN_ID_MAX                     (0x3fffffff)
 
-#define GRN_TRUE                       (1)
-#define GRN_FALSE                      (0)
+#define GRN_TRUE                       true
+#define GRN_FALSE                      false
 
 typedef enum {
   GRN_SUCCESS = 0,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190402/397a645f/attachment.html>


More information about the Groonga-commit mailing list
Zurück zum Archiv-Index