nobu
88559ce46e
* include/ruby/intern.h (rb_w32_fdcopy): add prototype. fixes
...
#4640
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02 18:57:06 +00:00
kosaki
04202dc83d
* win32/win32.c (rb_w32_fdcopy): New. This can copy even though
...
fdset size exceed FD_SETSIZE.
* include/ruby/intern.h (rb_fd_copy): use rb_w32_fdcopy()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 14:11:34 +00:00
kosaki
225fa965bc
* thread.c (rb_fd_copy): Change function argument. Now
...
rb_fd_copy() has fully copy semantics.
* include/ruby/intern.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 11:18:14 +00:00
kosaki
2d2544c8e6
* include/ruby/intern.h (rb_thread_select): mark as deprecated.
...
* ext/io/wait/wait.c (wait_readable): use rb_thread_fd_select
instead of rb_thread_select.
* ext/socket/init.c (wait_connectable0): ditto.
* ext/readline/readline.c (readline_event): ditto.
* io.c (rb_io_wait_readable, wait_readable, rb_io_wait_writable,
wait_writable): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 11:15:15 +00:00
kosaki
58e414b85e
* include/ruby/win32.h: remove redundunt declaration of
...
rb_w32_time_subtract().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 15:43:55 +00:00
nobu
5f131b648d
* thread_win32.c, include/ruby/win32.h: add prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 12:12:52 +00:00
kosaki
b4c5fad4b1
* thread_win32.c (native_cond_timedwait): New. r31373 caused
...
win32 build failure.
* thread_win32.c (__cond_timedwait, abs_timespec_to_timeout_ms):
New helper functions.
* win32/win32.c (rb_w32_time_subtract): rename from subtract and
remove static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 04:18:29 +00:00
nobu
8fabd0c551
* include/ruby/win32.h (frexp, modf): fix suppressing warnings on
...
mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 16:14:26 +00:00
nobu
8761467727
* io.c (validate_enc_binmode, rb_io_extract_modeenc): set newline
...
decorator according to open mode.
* transcode.c (rb_econv_prepare_options): new function, to prepare
econv options with newline flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:55:21 +00:00
nobu
3b937bbdc4
* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_MASK): add.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:54:14 +00:00
nobu
fcfc113b04
* include/ruby/win32.h (ftruncate, truncate, ftello, fseeko): non-64
...
versions on mingw are useless because they use int32_t. fixes #4564
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:50:09 +00:00
naruse
60aa9c809b
* include/ruby/intern.h: pcc can't use __builtin_constant_p.
...
* vm_exec.c: change condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:34:58 +00:00
nobu
d986500059
* include/ruby/win32.h (frexp, modf): wrongly declared as pure in
...
mingw math.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14 12:21:09 +00:00
nobu
f777225e09
* include/ruby/win32.h (ftruncate, truncate): mingw64 misses
...
prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14 12:21:04 +00:00
akr
77a12692ee
* include/ruby/st.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-12 11:54:28 +00:00
usa
c3b81f63e7
* include/ruby/win32.h: VC doesn't have ftruncate() and others, but
...
ruby needs HAVE_ macros to use our emulation functions.
(fix the problem of 31262)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-12 01:39:39 +00:00
luislavena
c2bfeaa244
Evaluate truncate, ftruncate and ftello existence
...
This corrects mingw-w64 compilation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11 16:38:10 +00:00
akr
4db93c3f41
* include/ruby/ruby.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-10 13:24:26 +00:00
akr
eb7d68819f
* include/ruby/util.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-09 09:02:03 +00:00
akr
e6ef26ae4b
* include/ruby/io.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-07 11:04:18 +00:00
akr
d55cf83561
* include/ruby/intern.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-06 12:08:46 +00:00
akr
a63105a45f
* include/ruby/encoding.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-05 11:34:15 +00:00
nobu
9b66922d7f
* numeric.c (flo_round): fix inaccurate results.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22 23:07:36 +00:00
arton
11e4052295
* hash.c (ruby_setenv): check env process block size with OS ver.
...
* win32/win32.c: export rb_w32_osver for above patch.
* include/ruby/win32.h: declare rb_w32_osver for Win32 Libs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-19 16:33:59 +00:00
nobu
247fdeedf8
* include/ruby/ruby.h (rb_funcall_passing_block): add prototype.
...
a patch by James M. Lawrence at [ruby-core:35501]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-17 15:54:22 +00:00
matz
eb807d42ec
* gc.c (rb_gc_set_params): allow GC parameter configuration by
...
environment variables. based on a patch from funny-falcon at
https://gist.github.com/856296 , but honors safe level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 08:39:39 +00:00
nagachika
eaf08203dd
* include/ruby/intern.h: fix a typo of prototype declaration.
...
rb_mutex_try_lock -> rb_mutex_trylock [ruby-dev:43213]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 13:59:21 +00:00
arton
e59654c24b
* include/ruby/win32.h: define WIN32 if neither _WIN64 nor WIN32 defined. it forces to use push/pop for pack(4) pragma.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 15:15:32 +00:00
nobu
58b325366d
* thread.c (rb_thread_io_blocking_region): new function to run
...
blocking region with GIL released, for fd.
* thread.c (rb_thread_fd_close): implement. [ruby-core:35203]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-12 05:44:23 +00:00
naruse
a3b4b499a5
* include/ruby/missing.h: don't use HAVE_STDDEF_H because it never
...
defined by configure though configure.bat defines it.
* include/ruby/ruby.h: move include stddef.h to defines.h
* include/ruby/defines.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 07:37:22 +00:00
naruse
c008ca5ae6
* include/ruby/encoding.h (rb_enc_step_back): cast 4th argument 'n'
...
as int because Ruby usually treats length value as long but
onigenc_step_back's 4th argument is int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 00:38:55 +00:00
kosaki
6909ea443f
* include/ruby/st.h (st_table): Added comment why we need __extension__.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-01 15:32:08 +00:00
tarui
fb672259d9
* include/ruby/win32.h, win32/win32.c: add rb_w32_inet_ntop.
...
inet_ntop's minimum supported client is Vista.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 17:31:18 +00:00
nobu
f989f7c7ea
* string.c (rb_str_ellipsize): new function to ellipsize a string.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 04:01:58 +00:00
nobu
4dcc883d06
* include/ruby/encoding.h (rb_enc_step_back): new function to step
...
back n characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 03:56:16 +00:00
kosaki
eea774d029
* include/ruby/ruby.h: Added NUM2MODET() and MODET2NUM() default definition.
...
Because r30686 introduced win32 build failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 16:06:00 +00:00
nobu
8489ac41ca
* include/ruby/ruby.h (ALLOCV): new API for exception-safe
...
temporary buffer. [ruby-core:34844]
* string.c (rb_alloc_tmp_buffer, rb_free_tmp_buffer):
implementation of the API.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-26 23:32:22 +00:00
nobu
fea355647e
* include/ruby/io.h: missing prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15 00:42:14 +00:00
nobu
dd55661f56
* include/ruby/defines.h (CASEFOLD_FILESYSTEM): HFS+ is case
...
insensitive.
* load.c (loaded_feature_path, rb_feature_p, load_lock): on a
case-insensitive filesystem, loaded features search should
ignore case. [ruby-core:34297]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-10 13:46:47 +00:00
nobu
65ea2eed78
* array.c (rb_ary_modify): export.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:25:50 +00:00
nobu
c8aaf31fdd
* array.c (rb_ary_resize): new utility function. [ruby-dev:42912]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:10:59 +00:00
nobu
2d5bd6b194
* intern.h (VALUE rb_ary_join): I have never seen this function
...
anywhere.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-01 01:59:14 +00:00
usa
90d5bcf910
* re.c (rb_reg_expr_str): need to escape if the coderage is invalid.
...
* error.c, include/ruby/intern.h (rb_compile_error_with_enc): new
function to raise syntax error, with source encoding'ed message.
* parse.y (compile_error): use above function.
[ruby-core:33951] (#4217 )
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-28 09:43:49 +00:00
nobu
5bf72d1fa6
* transcode.c (transcode_loop): call default handler of the given
...
hash, method, proc or [] method as fallback. [ruby-dev:42692]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 13:05:26 +00:00
nobu
2d4b0d6261
* hash.c (rb_hash_update_by): new API for Hash#update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-04 02:21:53 +00:00
shyouhei
51da92ea12
* vm.c (ruby_vm_at_exit): new API. This enables extension libs to
...
hook a VM termination. Right now, because the VM we have is
process global, most extensions do not deallocate resources and
leave them to Operating System's reaping userland processes. But
in a future we plan to have multiple VMs to run simultaneously in
a single process (MVM project). At that stage we can no longer
rely on OSes and have to manage every resources to be reclaimed
properly. So it is. For a forward-compatibility reason this API
is introduced now, encouraging you to be as gentle as you can for
your resources; that is, tidy up your room.
* include/ruby/vm.h: ditto.
* vm_core.h (rb_vm_struct): new field.
* vm.c (vm_init2): initialize above new field.
* eval.c (ruby_cleanup): trigger those hooks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 11:06:32 +00:00
usa
dd4c394564
* include/ruby/win32.h (rb_w32_write_console): wrong prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 05:20:08 +00:00
nobu
c6e4767068
* include/ruby/io.h (rb_io_buffer_t): extract from rb_io_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-18 13:58:47 +00:00
nobu
8a7aad9952
* fix type warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 12:30:39 +00:00
nobu
fe9f1e8cf8
* include/ruby/ruby.h (PRI_LL_PREFIX): format type specifier for
...
LONG_LONG may vary on platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 11:49:54 +00:00