зеркало из https://github.com/github/ruby.git
* gc.c, gc.h (rb_objspace_each_objects_without_setup):
Add a new (hidden) C-API to iterate objspace snapshot. This API is not safe to call any C-APIs in a given callback function. Be careful to use this C-API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b230d20ec4
Коммит
37067ed905
|
@ -1,3 +1,11 @@
|
|||
Wed Apr 2 20:57:15 2014 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c, gc.h (rb_objspace_each_objects_without_setup):
|
||||
Add a new (hidden) C-API to iterate objspace snapshot.
|
||||
|
||||
This API is not safe to call any C-APIs in a given callback
|
||||
function. Be careful to use this C-API.
|
||||
|
||||
Wed Apr 2 17:43:17 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (ac_cv_func___builtin_setjmp): gcc 4.9 disallows a
|
||||
|
|
10
gc.c
10
gc.c
|
@ -1788,6 +1788,16 @@ rb_objspace_each_objects(each_obj_callback *callback, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
rb_objspace_each_objects_without_setup(each_obj_callback *callback, void *data)
|
||||
{
|
||||
struct each_obj_args args;
|
||||
args.callback = callback;
|
||||
args.data = data;
|
||||
|
||||
objspace_each_objects((VALUE)&args);
|
||||
}
|
||||
|
||||
struct os_each_struct {
|
||||
size_t num;
|
||||
VALUE of;
|
||||
|
|
4
gc.h
4
gc.h
|
@ -97,6 +97,10 @@ void rb_objspace_each_objects(
|
|||
int (*callback)(void *start, void *end, size_t stride, void *data),
|
||||
void *data);
|
||||
|
||||
void rb_objspace_each_objects_without_setup(
|
||||
int (*callback)(void *, void *, size_t, void *),
|
||||
void *data);
|
||||
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
|
||||
#endif /* RUBY_GC_H */
|
||||
|
|
Загрузка…
Ссылка в новой задаче