Kouhei Sutou
null+****@clear*****
Thu Aug 14 21:56:51 JST 2014
Kouhei Sutou 2014-08-14 21:56:51 +0900 (Thu, 14 Aug 2014) New Revision: 534f6c0e4cb14e5d00e98deec2f57485a35ea33c https://github.com/groonga/groonga/commit/534f6c0e4cb14e5d00e98deec2f57485a35ea33c Message: Define missing GRN_INT32_POP Modified files: lib/db.h Modified: lib/db.h (+9 -0) =================================================================== --- lib/db.h 2014-08-14 21:37:36 +0900 (b5ab37d) +++ lib/db.h 2014-08-14 21:56:51 +0900 (d48a625) @@ -418,6 +418,15 @@ void grn_obj_spec_save(grn_ctx *ctx, grn_db_obj *obj); grn_rc grn_obj_reinit_for(grn_ctx *ctx, grn_obj *obj, grn_obj *domain_obj); +#define GRN_INT32_POP(obj,value) do {\ + if (GRN_BULK_VSIZE(obj) >= sizeof(int32_t)) {\ + GRN_BULK_INCR_LEN((obj), -(sizeof(int32_t)));\ + value = *(int32_t *)(GRN_BULK_CURR(obj));\ + } else {\ + value = 0;\ + }\ +} while (0) + #define GRN_UINT32_POP(obj,value) do {\ if (GRN_BULK_VSIZE(obj) >= sizeof(uint32_t)) {\ GRN_BULK_INCR_LEN((obj), -(sizeof(uint32_t)));\ -------------- next part -------------- HTML����������������������������... Télécharger