* 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:
parent
23b1a3d3fa
commit
a979eb4548
@ -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.
|
* gc.h (rb_objspace_each_objects): used in objspace.
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
#include <ruby/re.h>
|
#include <ruby/re.h>
|
||||||
#include <../../node.h>
|
#include <../../node.h>
|
||||||
#include <../../gc.h>
|
#include <../../gc.h>
|
||||||
|
#include <../../regint.h>
|
||||||
|
|
||||||
size_t rb_str_memsize(VALUE);
|
size_t rb_str_memsize(VALUE);
|
||||||
size_t rb_ary_memsize(VALUE);
|
size_t rb_ary_memsize(VALUE);
|
||||||
size_t rb_io_memsize(rb_io_t *);
|
size_t rb_io_memsize(rb_io_t *);
|
||||||
size_t onig_memsize(regex_t *);
|
|
||||||
size_t rb_generic_ivar_memsize(VALUE);
|
size_t rb_generic_ivar_memsize(VALUE);
|
||||||
size_t rb_objspace_data_type_memsize(VALUE obj);
|
size_t rb_objspace_data_type_memsize(VALUE obj);
|
||||||
|
|
||||||
|
@ -5249,7 +5249,7 @@ onig_free(regex_t* reg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
onig_memsize(regex_t *reg)
|
onig_memsize(const regex_t *reg)
|
||||||
{
|
{
|
||||||
size_t size = sizeof(regex_t);
|
size_t size = sizeof(regex_t);
|
||||||
if (IS_NOT_NULL(reg->p)) size += reg->alloc;
|
if (IS_NOT_NULL(reg->p)) size += reg->alloc;
|
||||||
|
2
regint.h
2
regint.h
@ -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 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
|
#if defined __GNUC__ && __GNUC__ >= 4
|
||||||
#pragma GCC visibility pop
|
#pragma GCC visibility pop
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user