Module: Groonga::EncodingSupport
- Included in:
- Table::KeySupport
- Defined in:
- ext/rb-grn-encoding-support.c,
ext/rb-grn-encoding-support.c
Overview
オブジェクトにエンコーディング関連の機能を提供するモジュール。
Instance Method Summary collapse
-
#encoding ⇒ Object
オブジェクトのエンコーディングを返す。.
Instance Method Details
#encoding ⇒ Object
オブジェクトのエンコーディングを返す。
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'ext/rb-grn-encoding-support.c', line 38 static VALUE rb_grn_encoding_support_get_encoding (VALUE self) { grn_ctx *context = NULL; grn_obj *object = NULL; grn_obj *encoding_value; grn_encoding encoding; rb_grn_object_deconstruct(SELF(self), &object, &context, NULL, NULL, NULL, NULL); encoding_value = grn_obj_get_info(context, object, GRN_INFO_ENCODING, NULL); rb_grn_context_check(context, self); memcpy(&encoding, GRN_BULK_HEAD(encoding_value), sizeof(encoding)); grn_obj_close(context, encoding_value); return GRNENCODING2RVAL(encoding); } |