summaryrefslogtreecommitdiff
path: root/ext/strscan
AgeCommit message (Collapse)Author
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02* re.c: Introduce RREGEXP_PTR.naruse
patch by dbussink. partially merge https://github.com/ruby/ruby/pull/497 * include/ruby/ruby.h: ditto. * gc.c: ditto. * ext/strscan/strscan.c: ditto. * parse.y: ditto. * string.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* ext/**/*.c (*_memsize): same as r52986 for extensions.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16allocate structs with wrappernobu
* parse.y (rb_parser_new, ripper_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * variable.c (rb_autoload): ditto. * ext/digest/digest.c (rb_digest_base_alloc): ditto. * ext/strscan/strscan.c (strscan_s_allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01re.c: rb_reg_region_copynobu
* re.c (rb_reg_region_copy): new function to try with GC if copy failed and return the error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01strscan.c: fix conditionnobu
* ext/strscan/strscan.c (strscan_init_copy): fix inverted condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01re.c: check if onig_region_copy failednobu
* re.c (CHECK_REGION_COPIED): onig_region_copy() can fail when memory exhausted but returns nothing, so check by if allocated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01use 0 for reservednobu
use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21Update dependency.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15Mark auogenerated part.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* common.mk: Remove comments in Dependency lines.akr
Notified by usa. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* tool/update-deps: Extend to fix dependencies.akr
* common.mk: Dependencies updated by tool/update-deps. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03strscan.c: encoding in messagesnobu
* ext/strscan/strscan.c (strscan_aref): preserve argument encoding in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03ext: get rid of inadvertent ID creationnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25introduce ZALLOC{,_N} to replace ALLOC{,_N}+MEMZERO usenormal
Using calloc where possible reduces code and binary sizes. * include/ruby/ruby.h (ZALLOC, ZALLOC_N): implement (Data_Make_Struct, TypedData_Make_Struct): ZALLOC replaces ALLOC+memset * compile.c (iseq_seq_sequence): ZALLOC_N replaces ALLOC_N+MEMZERO * cont.c (fiber_t_alloc): ZALLOC replaces ALLOC+MEMZERO * io.c (rb_io_reopen): ditto * iseq.c (prepare_iseq_build): ditto * parse.y (new_args_tail_gen, parser_new, ripper_s_allocate): ditto * re.c (match_alloc): ditto * variable.c (rb_const_set): ditto * ext/socket/raddrinfo.c (get_addrinfo): ditto * ext/strscan/strscan.c (strscan_s_allocate): ditto * gc.c (rb_objspace_alloc): calloc replaces malloc+MEMZERO git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11* ext/socket/ifaddr.c (IS_IFADDRS): Unused macro removed.akr
* ext/strscan/strscan.c (BUFSIZE): Ditto. * ext/zlib/zlib.c (OBJ_IS_FREED): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14strscan.c: fix typonobu
* ext/strscan/strscan.c (inspect1): fix typo, rb_str_cat() instead of rb_str_cat2(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14strscan.c: make string directlynobu
* ext/strscan/strscan.c (inspect1): extract intermediate string from the buffer directly, like as inspect2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13ext: real class namenobu
* ext/dl/cptr.c (rb_dlptr_inspect): use real class name, not singleton class. * ext/fiddle/pointer.c (rb_fiddle_ptr_inspect): ditto. * ext/strscan/strscan.c (strscan_inspect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUEnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-25Remove unused variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24* ext/strscan/strscan.c (strscan_aref): raise error if givennaruse
name reference is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21* ext/strscan/strscan.c (strscan_aref): support named captures.naruse
patched by Konstantin Haase [ruby-core:54664] [Feature #8343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13* lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,akr
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile. * ext/-test-/old_thread_select/depend: Update dependencies. * ext/-test-/wait_for_single_fd/depend: Ditto. * ext/bigdecimal/depend: Ditto. * ext/curses/depend: Ditto. * ext/digest/bubblebabble/depend: Ditto. * ext/digest/depend: Ditto. * ext/digest/md5/depend: Ditto. * ext/digest/rmd160/depend: Ditto. * ext/digest/sha1/depend: Ditto. * ext/digest/sha2/depend: Ditto. * ext/dl/callback/depend: Ditto. * ext/dl/depend: Ditto. * ext/etc/depend: Ditto. * ext/nkf/depend: Ditto. * ext/objspace/depend: Ditto. * ext/pty/depend: Ditto. * ext/readline/depend: Ditto. * ext/ripper/depend: Ditto. * ext/sdbm/depend: Ditto. * ext/socket/depend: Ditto. * ext/stringio/depend: Ditto. * ext/strscan/depend: Ditto. * ext/syslog/depend: Ditto. * ext/-test-/num2int/depend: Removed. * ext/dbm/depend: Ditto. * ext/fcntl/depend: Ditto. * ext/gdbm/depend: Ditto. * ext/racc/cparse/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28Added #charpos for multibyte string position.ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-15* ext/strscan/strscan.c: use typed data withnobu
onig_region_memsize(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-31* ext/strscan/strscan.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25* ext/sdbm/_sdbm.c (sdbm_open): use size_t.naruse
* ext/syck/bytecode.c: ditto. * ext/sdbm/_sdbm.c (delpair): use ptrdiff_t. * ext/sdbm/init.c: use RSTRING_LENINT. * ext/dl/handle.c: suppress warning: shorten-64-to-32. * ext/strscan/strscan.c: ditto. * ext/syck/emitter.c: ditto. * ext/syck/implicit.c: ditto. * ext/syck/syck.c: ditto. * ext/syck/token.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07.cvsignore: have not been used already. [Bug #3468]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 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-01-26* ext/strscan/strscan.c: fix rdoc. (length -> bytesize)naruse
reported by Kornelius Kalnbach. see [ruby-core:27792] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* ext/strscan/strscan.c (strscan_set_string): set string should not benobu
dupped or frozen, because freezing it causes #concat method failure, and unnecessary to dup without freezing. a patch from Aaron Patterson at [ruby-core:25145]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-17* ext/strscan/strscan.c (Init_strscan): remove obsoletematz
matchedsize method, use matched_size instead. [ruby-dev:38591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31* ext/strscan/strscan.c (strscan_do_scan): fix usecnt decrement.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30* ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed.matz
a patch <shinichiro.hamaji at gmail.com> in [ruby-dev:35880]. * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. * ext/strscan/strscan.c (strscan_do_scan): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-03* ext/strscan/strscan.c (strscan_scan_full, strscan_search_full): fixmame
document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-03* ext/strscan/strscan.c (strscan_exist_p): fix document.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* re.c (rb_reg_prepare_re): made non static with small refactoring.matz
* ext/strscan/strscan.c (strscan_do_scan): should adjust encoding before regex searching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28* ext/strscan/strscan.c (str_new): new function for allocate an stringakr
with encoding propagation. (extract_range): use str_new. (extract_beg_len): ditto. (strscan_peek): ditto. (strscan_rest): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-24* ext/strscan/strscan.c (strscan_initialize, strscan_getch): use thenobu
encoding of the target string instead of setting to StringScanner instance. [ruby-dev:31831] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06* array.c (rb_ary_cycle): typo in rdoc. a patch from Yuguimatz
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 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
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-08-25add regint.h and oniguruma.h to dependencekosako
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e