mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* st.c (new_size): raise RuntimeError when st_table is too big.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b050e719b
commit
b11b2b498c
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Sep 18 19:43:04 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* st.c (new_size): raise RuntimeError when st_table is too big.
|
||||||
|
|
||||||
Thu Sep 18 18:23:23 2008 Tanaka Akira <akr@fsij.org>
|
Thu Sep 18 18:23:23 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (enc_arg): must take pointer argument to avoid GC
|
* transcode.c (enc_arg): must take pointer argument to avoid GC
|
||||||
|
|
7
st.c
7
st.c
|
@ -6,9 +6,7 @@
|
||||||
#include "regint.h"
|
#include "regint.h"
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
#else
|
#else
|
||||||
#include "ruby/config.h"
|
#include "ruby/ruby.h"
|
||||||
#include "ruby/defines.h"
|
|
||||||
#include "ruby/st.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -135,6 +133,9 @@ new_size(int size)
|
||||||
if (newsize > size) return primes[i];
|
if (newsize > size) return primes[i];
|
||||||
}
|
}
|
||||||
/* Ran out of polynomials */
|
/* Ran out of polynomials */
|
||||||
|
#ifndef NOT_RUBY
|
||||||
|
rb_raise(rb_eRuntimeError, "st_table too big");
|
||||||
|
#endif
|
||||||
return -1; /* should raise exception */
|
return -1; /* should raise exception */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue