[Groonga-commit] groonga/groonga at 8e1406a [master] grn_uvector_size() supports non grn_id fixed size type such as GRN_DB_UINT64

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Dec 15 23:22:32 JST 2014


Kouhei Sutou	2014-12-15 23:22:32 +0900 (Mon, 15 Dec 2014)

  New Revision: 8e1406adea798271fe50d3b158439bf83e26143c
  https://github.com/groonga/groonga/commit/8e1406adea798271fe50d3b158439bf83e26143c

  Message:
    grn_uvector_size() supports non grn_id fixed size type such as GRN_DB_UINT64

  Modified files:
    lib/db.c

  Modified: lib/db.c (+3 -8)
===================================================================
--- lib/db.c    2014-12-15 23:21:43 +0900 (dabfbda)
+++ lib/db.c    2014-12-15 23:22:32 +0900 (68fb779)
@@ -4154,15 +4154,10 @@ grn_uvector_element_size_internal(grn_ctx *ctx, grn_obj *uvector)
 static unsigned int
 grn_uvector_size_internal(grn_ctx *ctx, grn_obj *uvector)
 {
-  unsigned int size;
-
-  if (IS_WEIGHT_UVECTOR(uvector)) {
-    size = GRN_BULK_VSIZE(uvector) / sizeof(weight_uvector_entry);
-  } else {
-    size = GRN_BULK_VSIZE(uvector) / sizeof(grn_id);
-  }
+  unsigned int element_size;
 
-  return size;
+  element_size = grn_uvector_element_size_internal(ctx, uvector);
+  return GRN_BULK_VSIZE(uvector) / element_size;
 }
 
 unsigned int
-------------- next part --------------
HTML����������������������������...
다운로드 



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