mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
* ext/syck/rubyext.c (syck_emitter_new): set buffer after
Data_Wrap_Struct to avoid possible GC. [ruby-talk:104835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
759ab333e3
commit
2970a70a80
2 changed files with 112 additions and 108 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jun 30 02:53:24 2004 why the lucky stiff <why@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/syck/rubyext.c (syck_emitter_new): set buffer after
|
||||||
|
Data_Wrap_Struct to avoid possible GC. [ruby-talk:104835]
|
||||||
|
|
||||||
Tue Jun 29 10:31:19 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jun 29 10:31:19 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.
|
* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.
|
||||||
|
|
|
@ -1286,14 +1286,13 @@ syck_emitter_new(argc, argv, class)
|
||||||
{
|
{
|
||||||
VALUE pobj, options, init_argv[1];
|
VALUE pobj, options, init_argv[1];
|
||||||
SyckEmitter *emitter = syck_new_emitter();
|
SyckEmitter *emitter = syck_new_emitter();
|
||||||
|
rb_scan_args(argc, argv, "01", &options);
|
||||||
|
|
||||||
|
pobj = Data_Wrap_Struct( class, syck_mark_emitter, syck_free_emitter, emitter );
|
||||||
syck_emitter_ignore_id( emitter, Qnil );
|
syck_emitter_ignore_id( emitter, Qnil );
|
||||||
syck_emitter_handler( emitter, rb_syck_output_handler );
|
syck_emitter_handler( emitter, rb_syck_output_handler );
|
||||||
|
|
||||||
emitter->bonus = (void *)rb_str_new2( "" );
|
emitter->bonus = (void *)rb_str_new2( "" );
|
||||||
|
|
||||||
rb_scan_args(argc, argv, "01", &options);
|
|
||||||
pobj = Data_Wrap_Struct( class, syck_mark_emitter, syck_free_emitter, emitter );
|
|
||||||
|
|
||||||
if ( ! rb_obj_is_instance_of( options, rb_cHash ) )
|
if ( ! rb_obj_is_instance_of( options, rb_cHash ) )
|
||||||
{
|
{
|
||||||
options = rb_hash_new();
|
options = rb_hash_new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue