summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/src/io.c
AgeCommit message (Collapse)Author
2020-01-01Merge pull request #4863 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error Add `mrb_num_args_error()` for "wrong number of arguments" error
2019-12-14Support bit flags for `IO.open`dearblue
Note that this bit flags are not compatible with the native flags defined in `#include <fcntl.h>`.
2019-12-14Remove unnessesary branchesdearblue
2019-12-12Add `mrb_num_args_error()` for "wrong number of arguments" errorKOBAYASHI Shuji
To unify the style of messages.
2019-11-09Fix argument specs to `IO`KOBAYASHI Shuji
2019-10-23Remove unnecessary `mrb_funcall()`.Yukihiro "Matz" Matsumoto
2019-10-23Remove unnecessary `mrb_string_p()` check.Yukihiro "Matz" Matsumoto
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-14Replace `String#byteslice` by custom `IO._bufread`.Yukihiro "Matz" Matsumoto
`byteslice` creates 2 string objects. `_bufread` creates one, and modifies the original buffer string, that is more efficient.
2019-09-12Remove `$/` from mruby implementation.Yukihiro "Matz" Matsumoto
1. `$/` and other Perl-ish global variables are not defined in ISO. 2. The current Ruby policy do not encourage those variables. 3. Those variables has global effect and can cause troubles.
2019-08-07Reorganize `mrb_string_value_cstr` and related functions.Yukihiro "Matz" Matsumoto
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete `mrb_string_cstr`: new function to retrieve NULL terminated C string `RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
2019-08-06Removed an unused local variable; ref #4615Yukihiro "Matz" Matsumoto
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back.
2019-06-07Replace obsolete macrosdearblue
2018-12-23Suppress TARGET_OS_IPHONE warnsdearblue
2018-09-15Exclude pipe and exec on iOS/tvOSTom Black
Use of `execl()` is prohibited on these platforms
2018-09-16fixup! Add support for iOS platforms that does not support `fork`; fix #4113Yukihiro "Matz" Matsumoto
2018-09-16Add support for iOS platforms that does not support `fork`; fix #4113Yukihiro "Matz" Matsumoto
2018-06-19Fix wrong free functionKouhei Sutou
mrb_locale_free() should be used for the return value of mrb_locale_from_utf8().
2018-05-01Check the return value from `mrb_get_datatype()`; fix #4009Yukihiro "Matz" Matsumoto
The return value (void*) may be NULL. Avoid using `mrb_get_datatype()` directly and use `io_get_open_fptr()` instead.
2018-04-18`mrb_io_initialize_copy` should not free existing `fptr`; fix #4005Yukihiro "Matz" Matsumoto
When arguments `copy` and `orig` are the same object.
2018-04-18`mrb_dup()` should fail if `fd` is a negative integer; ref #4005Yukihiro "Matz" Matsumoto
2018-04-17Fix `use after free in File#initilialize_copy`; fix #4001Yukihiro "Matz" Matsumoto
The bug and the fix were reported by https://hackerone.com/pnoltof
2018-01-14Remove trailing spaceksss
2018-01-14Should be true for close_on_exec flagksss
2017-12-18Fix descriptor leakage; ref #3903Yukihiro "Matz" Matsumoto
2017-12-18Fix `fptr` leakage; ref #3903Yukihiro "Matz" Matsumoto
2017-12-18Use `_dup2` instead of `dup2` on Windows; ref #3903Yukihiro "Matz" Matsumoto
2017-12-18`open` on Windows takes `int` 3rd argument instead of `mode_t`.Yukihiro "Matz" Matsumoto
2017-12-18Use `_dup` instead of `dup` on Windows; ref #3903Yukihiro "Matz" Matsumoto
2017-12-17Implement IO#initialize_copyksss
2017-12-14Initialized mrb_io.is_socketHiroshi Mimaki
2017-12-14Fix socket closing by using `closesocket` API in windows instead.Takeshi Watanabe
2017-12-13Reduce VC++ type mismatch warnings.Yukihiro "Matz" Matsumoto
2017-12-12fix compilation errorYasuhiro Matsumoto
2017-12-12fix compilation errorYasuhiro Matsumoto
2017-12-12add definition for pid_t on MSVCYasuhiro Matsumoto
2017-12-12close handleYasuhiro Matsumoto
2017-12-12implement popen on WindowsYasuhiro Matsumoto
2017-12-12fix wrong variable nameYasuhiro Matsumoto
2017-12-12use filename in localeYasuhiro Matsumoto
2017-12-12Support MRB_WITHOUT_FLOAT to mruby-io and mruby-packYusuke Endoh
2017-12-09Reduce VC++ compiler warnings.Yukihiro "Matz" Matsumoto
2017-12-08Reduce compiler warnings from `mruby-io` gem.Yukihiro "Matz" Matsumoto
2017-12-07Add 'mrbgems/mruby-io/' from commit '3c8e1f94c44252c836f79a48bb17726da28e2756'Yukihiro "Matz" Matsumoto
git-subtree-dir: mrbgems/mruby-io git-subtree-mainline: 10ed730e4bd921cf4d8fe6f6d2e3cb3f0840f3b7 git-subtree-split: 3c8e1f94c44252c836f79a48bb17726da28e2756