• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

修订版758096334f467dc3ac6753cb8769c9368388ed1b (tree)
时间2012-04-21 00:29:01
作者Patrick Hogan <pbhogan@gmai...>
CommiterPatrick Hogan

Log Message

Remove unnecessary check for size_t < 0

size_t can never be negative since it is an unsigned integer according to standard. Removed to silence warning.

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>

更改概述

差异

--- a/src/array.c
+++ b/src/array.c
@@ -35,9 +35,6 @@ mrb_ary_new_capa(mrb_state *mrb, size_t capa)
3535 {
3636 struct RArray *a;
3737
38- if (capa < 0) {
39- mrb_raise(mrb, E_ARGUMENT_ERROR, "negative ary size (or size too big)");
40- }
4138 #ifdef LONG_MAX
4239 if (capa > ARY_MAX_SIZE) {
4340 mrb_raise(mrb, E_ARGUMENT_ERROR, "ary size too big");