summaryrefslogtreecommitdiff
path: root/ext/syck/rubyext.c
AgeCommit message (Collapse)Author
2012-03-02* ext/syck/rubyext.c (mktime_do): use ISDIGIT().nobu
[ruby-core:43060] [Bug #6108] * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char. [ruby-core:43060] [Bug #6108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06* ext/syck/rubyext.c (mktime_do): extra digits are not used.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06* ext/syck/rubyext.c (mktime_do): remove unused variable offset.naruse
* ext/syck/syck.h: use #ifdef instead of #if DEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06* ext/syck/rubyext.c (mktime_do): avoid buffer overrun, byshyouhei
silently ignoring lesser significant digits. Required buffer length can be computable so you might at first think of allocating enough memory space on the fly using alloca(). That is a wrong idea because when using alloca there is always risk of integer overflow. A function that accepts outer-process resources like this should not blindly trust its inputs. In this particular case we just want to generate miliseconds resolution by strtod() so the string in question needs no more length than what we originally have. Ignoring lesser significant digits should suffice I believe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06YAML.load time correctly parse usecs smaller than 1 fixes #4571shyouhei
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-05* ext/syck/rubyext.c (syck_node_init_copy): SyckNode is notnobu
copiable. [ruby-core:35094] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11* fix type warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* ext/syck/rubyext.c (struct mktime_arg): constified.nobu
* ext/syck/rubyext.c (mktime_do, mktime_r, rb_syck_mktime): fix function signatures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* process.c: suppress warning for signed and unsigned typemame
inconsistency. * ext/psych/parser.c: ditto. * ext/sdbm/_sdbm.c: ditto. * ext/syck/rubyext.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03* lib/yaml: Moved to ext/syck/lib, Syck only uses Syck constant.tenderlove
* lib/yaml.rb: Added an engine manager for choosing YAML engine. * ext/syck/lib/syck/rubytypes.rb: squashed warnings when using Psych git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-22YAML parser don't need identity hash.akr
revert the part of previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-22* ext/syck/rubyext.c (id_hash_new): new function to create a hashakr
which key is compared by object id. (syck_parser_load): use id_hash_new for bonus->data. (syck_parser_load_documents): ditto. (syck_emitter_reset): ditto. * lib/yaml.rb (YAML.quick_emit): give the object itself to eimitter. don't use object_id and hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21* time.c: remove time_t restriction from Time class.akr
* timev.h: new file to define struct vtm. * strftime.c: format struct vtm instead of struct tm. * ext/syck/rubyext.c (mktime_do): don't use time_t; [ruby-dev:38191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-19* ext/syck/rubyext.c (rb_syck_mktime): return DateTime for a valuematz
out of range of Time. [ruby-core:19919] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31* ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has nonobu
effect unless debug mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31* iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms whichnobu
int size differs from pointer size. * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): ditto * ext/syck/rubyext.c (rb_syck_err_handler), (syck_default_error_handler): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* ext/syck/rubyext.c (rb_syck_compile): remove meaningless branchmame
that misleads into thinking that the variable sav may be uninitialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25* ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):nobu
constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* ext/syck: suppress warnings more.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* ext/syck: suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* ext/syck/rubyext.c, ext/syck/yaml2byte.c, ext/syck/emitter.c,mame
ext/syck/syck.c, ext/syck/handler.c, ext/syck/syck.h: suppress GCC warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-16* ext/syck/rubyext.c: add encoding header.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15* ext/syck/rubyext.c (yaml_org_handler): associate encoding.naruse
* ext/syck/rubyext.c (syck_genericresolver_node_import): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17* enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): addmame
parentheses to remove warnings of gcc. * io.c (rb_io_getc): remove unused variables. * compile.c (NODE_NEXT, NODE_REDO): remove unused labels. * ext/nkf/nkf.c (rb_nkf_convert): remove unused variables. * ext/syck/rubyext.c (syck_resolver_initialize, syck_resolver_detect_implicit, syck_emitter_emit): remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* ext/syck/rubyext.c (syck_genericresolver_node_import): shouldmatz
not set instance variable "@kind" before initializing it. [ruby-dev:32677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30* ext/syck/rubyext.c (rb_syck_mktime): avoid segmentation fault.matz
[ruby-core:13735] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15* ext/syck/rubyext.c: Node#value defined twice.why
* lib/yaml/: several method redefinitions causing warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29* include/ruby/intern.h: declare rb_hash_tbl.akr
* include/ruby/ruby.h (RHash): delay st_table allocation. rename tbl field to ntbl to detect direct reference to the st_table as a compile error. (RHASH_TBL): abstract accessor defined. (RHASH_ITER_LEV): ditto. (RHASH_IFNONE): ditto. (RHASH_SIZE): ditto. (RHASH_EMPTY_P): ditto. * hash.c: delay st_table allocation. * gc.c: replace tbl by ntbl. * array.c: replace direct field accessor by abstract field accessor such as RHASH(hash)->tbl to RHASH_TBL(hash). * marshal.c: ditto. * insns.def: ditto. * ext/iconv/iconv.c: ditto. * ext/json/ext/generator/generator.c: ditto. * ext/json/ext/parser/parser.c: ditto. * ext/syck/rubyext.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19* regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz
Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ruby.h (struct RArray): embed small arrays.matz
(RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz
<stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-03* ruby.h: fixed prototype.ocean
* ext/syck/rubyext.c: defined symbol ID as global variable as others. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-03* eval.c: unify ruby_class (for method definition) and ruby_cbasematz
(for constant reference). * eval.c (rb_call0): use TMP_ALLOC() instead of allocating a temporary array object. * eval.c (eval): need not to protect $SAFE value. [ruby-core:07177] * error.c (Init_Exception): change NameError to direct subclass of Exception so that default rescue do not handle it silently. * struct.c (rb_struct_select): update RDoc description. [ruby-core:7254] * numeric.c (int_upto): return an enumerator if no block is attached to the method. * numeric.c (int_downto): ditto. * numeric.c (int_dotimes): ditto. * enum.c (enum_first): new method Enumerable#first to take first n element from an enumerable. * enum.c (enum_group_by): new method Enumerable#group_by that groups enumerable values according to their block values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-30* ext/syck/rubyext.c (syck_resolver_transfer): workaround for SEGV.ocean
ex: YAML.load("!map:B {}"). [ruby-core:7217] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-10Sorry, commit miss.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-10* ext/syck/rubyext.c (syck_resolver_transfer): should be able to loadocean
!ruby/object:Bignum syntax 1.8.3 dumped. [ruby-core:6159] (written by akira yamada) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-31* ext/syck/rubyext.c: attribute name was truncated with Rev1.64.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29* eval.c (rb_mod_define_method): should save safe_level in thematz
proc object. [ruby-dev:28146] * test/drb/drbtest.rb (DRbService::self.ext_service): increase timeout limit. a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>. [ruby-dev:28132] * eval.c (ev_const_get): fixed a bug in constant reference during instance_eval. [yarv-dev:707] * eval.c (ev_const_defined): ditto. * lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from Joel VanderWerf <vjoel at path.berkeley.edu>. [ruby-talk:165285] [ruby-core:6995] * ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from Kailden <kailden at gmail.com>. [ruby-core:06984] * ext/syck/rubyext.c (rb_syck_compile): avoid potential memory leak. * ext/syck/rubyext.c (syck_set_ivars): avoid potential memory leak by explicit symbol allocation. * lib/delegate.rb (Delegator::method_missing): should delegate block as well. * lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to use Tempfile. A fix from Zev Blut <rubyzbibd at ubit.com>. [ruby-core:06076] * string.c: remove global functions work on $_. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-20* ext/syck/rubyext.c (syck_emitter_reset): to ensure compatibilitywhy
with previous Ruby versions, documents are no longer headless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-20* ext/syck/rubyext.c (syck_node_transform): ruby object holdingocean
explicitly freed SyckNode caused SEGV. [ruby-dev:28067] ... I think syck GC problem was solved now! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-19* ext/syck/syck.h (S_FREE): small hack. no need to check if pointer isocean
NULL or not before S_FREE. * ext/syck/rubyext.c (syck_parser_assign_io): rb_check_string_type can return new RString. if so, it becomes unreachable from GC after returns syck_parser_assign_io, and can be freed by GC. (dangling in syck io system) so extends its life time till syck_parse is called. * ext/syck/rubyext.c (syck_parser_s_alloc): always allocates bonus, so no need to check if NULL, and "volatile VALUE hash" is not needed. (bonus->port was not protected in syck_emitter_reset) * ext/syck/rubyext.c (syck_mark_parser): ditto. * ext/syck/rubyext.c (syck_parser_load): ditto. * ext/syck/rubyext.c (syck_parser_load_documents): ditto. * ext/syck/rubyext.c (syck_emitter_s_alloc): ditto. * ext/syck/rubyext.c (syck_mark_emitter): ditto. * ext/syck/rubyext.c (syck_emitter_reset): ditto. * ext/syck/rubyext.c (syck_scalar_value_set): "should set newly allocated memory instead of RString's internal storage" stuff again. by this, should call syck_free_node instead of rb_syck_free_node. * ext/syck/rubyext.c (syck_node_type_id_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-19* ext/syck/rubyext.c: sorry, I reverted my "should set newlyocean
allocated memory instead of RString's internal storage" stuff. node allocated in rubyext.c seems to be freed by rb_syck_free_node not syck_free_node, and it won't free data.str->ptr and type_id. (I still think this is unsafe because RString(foo)->ptr becomes dangling pointer when RString is modified or freed, but anyway I misunderstood, so go back to original code for now) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-17* ext/syck/rubyext.c (syck_emitter_reset): should initializeocean
emitter->bonus->oid. otherwise rb_gc_mark crashes. * ext/syck/rubyext.c (syck_mark_parser): should mark anchor nodes because they hold ruby objects. (ie: rb_syck_bad_anchor_handler) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* ext/syck/rubyext.c (rb_syck_compile): fixed memory leak.ocean
* ext/syck/rubyext.c: should protect global variable from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* ext/syck/rubyext.c (syck_scalar_value_set): should set newlyocean
allocated memory instead of RString's internal storage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* ext/syck/rubyext.c (syck_resolver_tagurize): fixed memory leak.ocean
* ext/syck/rubyext.c (syck_node_type_id_set): should set newly allocated memory instead of RString's internal storage. ... these fixes won't fix [ruby-dev:27839]. more work is needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e