[Groonga-commit] groonga/groonga at c314595 [master] Use specified size type

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Nov 5 14:36:31 JST 2018


Kouhei Sutou	2018-11-05 14:36:31 +0900 (Mon, 05 Nov 2018)

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

  Message:
    Use specified size type

  Modified files:
    include/groonga/string.h
    lib/grn_string.h
    lib/string.c

  Modified: include/groonga/string.h (+6 -6)
===================================================================
--- include/groonga/string.h    2018-11-05 14:31:20 +0900 (f004b6cd2)
+++ include/groonga/string.h    2018-11-05 14:36:31 +0900 (3f7b602f9)
@@ -27,8 +27,8 @@ extern "C" {
 typedef struct {
   const char *orig;
   char *norm;
-  short *checks;
-  unsigned char *ctypes;
+  int16_t *checks;
+  uint8_t *ctypes;
   int flags;
   unsigned int orig_blen;
   unsigned int norm_blen;
@@ -90,14 +90,14 @@ GRN_API grn_rc grn_string_set_normalized(grn_ctx *ctx, grn_obj *string,
                                          char *normalized,
                                          unsigned int length_in_bytes,
                                          unsigned int n_characters);
-GRN_API const short *grn_string_get_checks(grn_ctx *ctx, grn_obj *string);
+GRN_API const int16_t *grn_string_get_checks(grn_ctx *ctx, grn_obj *string);
 GRN_API grn_rc grn_string_set_checks(grn_ctx *ctx,
                                      grn_obj *string,
-                                     short *checks);
-GRN_API const unsigned char *grn_string_get_types(grn_ctx *ctx, grn_obj *string);
+                                     int16_t *checks);
+GRN_API const uint8_t *grn_string_get_types(grn_ctx *ctx, grn_obj *string);
 GRN_API grn_rc grn_string_set_types(grn_ctx *ctx,
                                     grn_obj *string,
-                                    unsigned char *types);
+                                    uint8_t *types);
 GRN_API const uint64_t *grn_string_get_offsets(grn_ctx *ctx, grn_obj *string);
 GRN_API grn_rc grn_string_set_offsets(grn_ctx *ctx,
                                       grn_obj *string,

  Modified: lib/grn_string.h (+2 -2)
===================================================================
--- lib/grn_string.h    2018-11-05 14:31:20 +0900 (7cbf6336f)
+++ lib/grn_string.h    2018-11-05 14:36:31 +0900 (f1173bfbd)
@@ -35,8 +35,8 @@ typedef struct {
   char *normalized;
   unsigned int normalized_length_in_bytes;
   unsigned int n_characters;
-  short *checks;
-  unsigned char *ctypes;
+  int16_t *checks;
+  uint8_t *ctypes;
   uint64_t *offsets;
   grn_encoding encoding;
   int flags;

  Modified: lib/string.c (+5 -5)
===================================================================
--- lib/string.c    2018-11-05 14:31:20 +0900 (34f5a0100)
+++ lib/string.c    2018-11-05 14:36:31 +0900 (318f24b94)
@@ -392,7 +392,7 @@ grn_string_set_normalized(grn_ctx *ctx, grn_obj *string,
   GRN_API_RETURN(rc);
 }
 
-const short *
+const int16_t *
 grn_string_get_checks(grn_ctx *ctx, grn_obj *string)
 {
   int16_t *checks = NULL;
@@ -407,7 +407,7 @@ grn_string_get_checks(grn_ctx *ctx, grn_obj *string)
 }
 
 grn_rc
-grn_string_set_checks(grn_ctx *ctx, grn_obj *string, short *checks)
+grn_string_set_checks(grn_ctx *ctx, grn_obj *string, int16_t *checks)
 {
   grn_rc rc;
   grn_string *string_ = (grn_string *)string;
@@ -422,10 +422,10 @@ grn_string_set_checks(grn_ctx *ctx, grn_obj *string, short *checks)
   GRN_API_RETURN(rc);
 }
 
-const unsigned char *
+const uint8_t *
 grn_string_get_types(grn_ctx *ctx, grn_obj *string)
 {
-  unsigned char *types = NULL;
+  uint8_t *types = NULL;
   grn_string *string_ = (grn_string *)string;
   GRN_API_ENTER;
   if (string_) {
@@ -437,7 +437,7 @@ grn_string_get_types(grn_ctx *ctx, grn_obj *string)
 }
 
 grn_rc
-grn_string_set_types(grn_ctx *ctx, grn_obj *string, unsigned char *types)
+grn_string_set_types(grn_ctx *ctx, grn_obj *string, uint8_t *types)
 {
   grn_rc rc;
   grn_string *string_ = (grn_string *)string;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181105/8238fbb6/attachment-0001.html>


More information about the Groonga-commit mailing list
Back to archive index