Masafumi Yokoyama
null+****@clear*****
Thu Oct 30 23:39:59 JST 2014
Masafumi Yokoyama 2014-10-30 23:39:59 +0900 (Thu, 30 Oct 2014) New Revision: cc2887b374b2d03038b0f17b76b1600147ceb06a https://github.com/ranguba/rroonga/commit/cc2887b374b2d03038b0f17b76b1600147ceb06a Message: Support LZ4 for exception GitHub: #28 Modified files: ext/groonga/rb-grn-exception.c test/test-exception.rb Modified: ext/groonga/rb-grn-exception.c (+10 -9) =================================================================== --- ext/groonga/rb-grn-exception.c 2014-10-30 23:27:34 +0900 (af3f4ed) +++ ext/groonga/rb-grn-exception.c 2014-10-30 23:39:59 +0900 (47c7ec7) @@ -1,6 +1,7 @@ /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2009-2012 Kouhei Sutou <kou �� clear-code.com> + Copyright (C) 2014 Masafumi Yokoyama <myokoym �� gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -83,7 +84,7 @@ static VALUE eGrnNotSocket; static VALUE eGrnOperationNotSupported; static VALUE eGrnAddressIsInUse; static VALUE eGrnZLibError; -static VALUE eGrnLZOError; +static VALUE eGrnLZ4Error; static VALUE eGrnStackOverFlow; static VALUE eGrnSyntaxError; static VALUE eGrnRetryMax; @@ -288,8 +289,8 @@ rb_grn_rc_to_exception (grn_rc rc) case GRN_ZLIB_ERROR: exception = eGrnZLibError; break; - case GRN_LZO_ERROR: - exception = eGrnLZOError; + case GRN_LZ4_ERROR: + exception = eGrnLZ4Error; break; case GRN_STACK_OVER_FLOW: exception = eGrnStackOverFlow; @@ -524,8 +525,8 @@ rb_grn_rc_to_message (grn_rc rc) case GRN_ZLIB_ERROR: message = "ZLib error"; break; - case GRN_LZO_ERROR: - message = "LZO error"; + case GRN_LZ4_ERROR: + message = "LZ4 error"; break; case GRN_STACK_OVER_FLOW: message = "stack over flow"; @@ -1114,12 +1115,12 @@ rb_grn_init_exception (VALUE mGrn) rb_define_class_under(mGrn, "ZLibError", rb_eGrnError); /* - * Document-class: Groonga::LZOError + * Document-class: Groonga::LZ4Error * - * LZOに問題があるときに発生する。 + * LZ4に問題があるときに発生する。 */ - eGrnLZOError = - rb_define_class_under(mGrn, "LZOError", rb_eGrnError); + eGrnLZ4Error = + rb_define_class_under(mGrn, "LZ4Error", rb_eGrnError); /* * Document-class: Groonga::StackOverFlow Modified: test/test-exception.rb (+2 -1) =================================================================== --- test/test-exception.rb 2014-10-30 23:27:34 +0900 (85cbcbf) +++ test/test-exception.rb 2014-10-30 23:39:59 +0900 (2f3432b) @@ -1,4 +1,5 @@ # Copyright (C) 2009-2010 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2014 Masafumi Yokoyama <myokoym �� gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -83,7 +84,7 @@ class ExceptionTest < Test::Unit::TestCase assert_const_defined(Groonga, :OperationNotSupported) assert_const_defined(Groonga, :AddressIsInUse) assert_const_defined(Groonga, :ZLibError) - assert_const_defined(Groonga, :LZOError) + assert_const_defined(Groonga, :LZ4Error) assert_const_defined(Groonga, :StackOverFlow) assert_const_defined(Groonga, :SyntaxError) assert_const_defined(Groonga, :RetryMax) -------------- next part -------------- HTML����������������������������...Descargar