1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* regcomp.c (onig_memsize): constified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-08-14 06:17:38 +00:00
parent 23b1a3d3fa
commit a979eb4548
4 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,6 @@
Sat Aug 14 15:11:01 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat Aug 14 15:17:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* regcomp.c (onig_memsize): constified.
* gc.h (rb_objspace_each_objects): used in objspace.

View file

@ -29,11 +29,11 @@
#include <ruby/re.h>
#include <../../node.h>
#include <../../gc.h>
#include <../../regint.h>
size_t rb_str_memsize(VALUE);
size_t rb_ary_memsize(VALUE);
size_t rb_io_memsize(rb_io_t *);
size_t onig_memsize(regex_t *);
size_t rb_generic_ivar_memsize(VALUE);
size_t rb_objspace_data_type_memsize(VALUE obj);

View file

@ -5249,7 +5249,7 @@ onig_free(regex_t* reg)
}
size_t
onig_memsize(regex_t *reg)
onig_memsize(const regex_t *reg)
{
size_t size = sizeof(regex_t);
if (IS_NOT_NULL(reg->p)) size += reg->alloc;

View file

@ -842,6 +842,8 @@ typedef int (*ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE)(void);
extern int onigenc_property_list_init P_((ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE));
extern size_t onig_memsize P_((const regex_t *reg));
#if defined __GNUC__ && __GNUC__ >= 4
#pragma GCC visibility pop
#endif