diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-08 17:44:51 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-08 17:44:51 +0000 |
commit | 28f5e12c24edda376c863090c09406185373167b (patch) | |
tree | d37adb13ec69829960f21d187cbd689d780338eb /include/ruby/st.h | |
parent | 94419c16dc6e34875f923bdf1e72c0c926cd5126 (diff) | |
download | ruby-28f5e12c24edda376c863090c09406185373167b.tar.gz |
* configure.in: check function attirbute const and pure,
and define CONSTFUNC and PUREFUNC if available.
Note that I don't add those options as default because
it still shows many false-positive (it seems not to consider
longjmp).
* vm_eval.c (stack_check): get rb_thread_t* as an argument
to avoid duplicate call of GET_THREAD().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/st.h')
-rw-r--r-- | include/ruby/st.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h index 190bad2a35..de5aaaebec 100644 --- a/include/ruby/st.h +++ b/include/ruby/st.h @@ -131,18 +131,18 @@ void st_free_table(st_table *); void st_cleanup_safe(st_table *, st_data_t); void st_clear(st_table *); st_table *st_copy(st_table *); -int st_numcmp(st_data_t, st_data_t); -st_index_t st_numhash(st_data_t); -int st_locale_insensitive_strcasecmp(const char *s1, const char *s2); -int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n); +CONSTFUNC(int st_numcmp(st_data_t, st_data_t)); +CONSTFUNC(st_index_t st_numhash(st_data_t)); +PUREFUNC(int st_locale_insensitive_strcasecmp(const char *s1, const char *s2)); +PUREFUNC(int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)); #define st_strcasecmp st_locale_insensitive_strcasecmp #define st_strncasecmp st_locale_insensitive_strncasecmp -size_t st_memsize(const st_table *); -st_index_t st_hash(const void *ptr, size_t len, st_index_t h); -st_index_t st_hash_uint32(st_index_t h, uint32_t i); -st_index_t st_hash_uint(st_index_t h, st_index_t i); -st_index_t st_hash_end(st_index_t h); -st_index_t st_hash_start(st_index_t h); +PUREFUNC(size_t st_memsize(const st_table *)); +PUREFUNC(st_index_t st_hash(const void *ptr, size_t len, st_index_t h)); +CONSTFUNC(st_index_t st_hash_uint32(st_index_t h, uint32_t i)); +CONSTFUNC(st_index_t st_hash_uint(st_index_t h, st_index_t i)); +CONSTFUNC(st_index_t st_hash_end(st_index_t h)); +CONSTFUNC(st_index_t st_hash_start(st_index_t h)); #define st_hash_start(h) ((st_index_t)(h)) RUBY_SYMBOL_EXPORT_END |