aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Improve IO::Buffer resize and introduce ownership transfer.Samuel Williams2021-12-201-1/+2
|
* Default size for IO::Buffer.Samuel Williams2021-12-191-0/+1
|
* Introduce io_result wrapper for passing `[-errno, size]` in VALUE.Samuel Williams2021-12-181-2/+52
|
* intern/select/posix.h: remove unused parameter from rb_fd_dupYuta Saito2021-12-111-2/+1
| | | | This unused parameter seems to be accidently introduced by https://github.com/ruby/ruby/commit/9e6e39c
* Revert zero-check for allocaNobuyoshi Nakada2021-12-101-3/+3
| | | | | Something weird results in int-in-bool-context and stringop-overflow warnings.
* Fix stack buffer overflowNobuyoshi Nakada2021-12-101-3/+3
| | | | https://hackerone.com/reports/1306859
* Add Class#subclassesJean Boussier2021-11-231-1/+14
| | | | | | | Implements [Feature #18273] Returns an array containing the receiver's direct subclasses without singleton classes.
* revival of must_not_null()卜部昌平2021-11-111-8/+6
| | | | | | | | Presence of RBIMPL_ATTR_NONNULL let C compilers to eliminate must_not_null(). Because null pointers are not allowed to exist there are no reason to call the function. In reality null pointers are still passed to those functions in a number of ways. Runtime check for them are definitely nice to have. fix [Feature#18280]
* rb_file_size: add doxygen卜部昌平2021-11-111-0/+17
| | | | Must not be a bad idea to improve documents. [ci skip]
* rb_enc_code_to_mbclen: fix doxygen卜部昌平2021-11-111-4/+4
| | | | Wrong parameter name. [ci skip]
* RB_ENCODING_SET_INLINED: fix doxygen卜部昌平2021-11-111-3/+3
| | | | Wrong parameter name. [ci skip]
* ENCODING_MASK: fix doxygen link [ci skip]卜部昌平2021-11-111-1/+1
|
* io/buffer.h: C linkage卜部昌平2021-11-111-2/+2
| | | | | Because `make install` installs this header to target systems, it must be ready to be `#include`d form a C++ program.
* size_t is not for file sizeNobuyoshi Nakada2021-11-102-2/+6
|
* Mark IO::Buffer as experimental.Samuel Williams2021-11-101-0/+3
|
* IO::Buffer for scheduler interface.Samuel Williams2021-11-104-4/+118
|
* [Feature #18290] Deprecate rb_gc_force_recycle and remove ↵Peter Zhu2021-11-081-0/+2
| | | | | | | | invalidate_mark_stack_chunk This commit deprecates rb_gc_force_recycle and coverts it to a no-op function. Also removes invalidate_mark_stack_chunk since only rb_gc_force_recycle uses it.
* memory_view.c: Add _memory_view_entry member in rb_memory_view_t (#5088)Kenta Murata2021-11-081-4/+8
|
* Fix typosNobuyoshi Nakada2021-11-026-9/+9
|
* Add Class#descendantsJeremy Evans2021-10-261-0/+13
| | | | | | | | Doesn't include receiver or singleton classes. Implements [Feature #14394] Co-authored-by: fatkodima <fatkodima123@gmail.com> Co-authored-by: Benoit Daloze <eregontp@gmail.com>
* improve doc coverage [ci skip]卜部昌平2021-10-261-7/+9
| | | | Just split the comment for struct's one and array's one.
* just another evidence that @shyouhei is an idiot [ci skip]卜部昌平2021-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gdb) ptype/o struct RString /* offset | size */ type = struct RString { /* 0 | 16 */ struct RBasic { /* 0 | 8 */ VALUE flags; /* 8 | 8 */ const VALUE klass; /* total size (bytes): 16 */ } basic; /* 16 | 24 */ union { /* 24 */ struct { /* 16 | 8 */ long len; /* 24 | 8 */ char *ptr; /* 32 | 8 */ union { /* 8 */ long capa; /* 8 */ VALUE shared; /* total size (bytes): 8 */ } aux; /* total size (bytes): 24 */ } heap; /* 24 */ struct { /* 16 | 24 */ char ary[24]; /* total size (bytes): 24 */ } embed; /* XXX 8-byte padding */ /* total size (bytes): 24 */ } as; /* total size (bytes): 40 */ } (gdb)
* [Feature #18239] Implement VWA for stringsPeter Zhu2021-10-252-0/+24
| | | | | This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings.
* [Feature #18239] Add struct for embedded stringsPeter Zhu2021-10-251-10/+11
|
* Deprecate include/prepend in refinements and add Refinement#import_methods ↵Shugo Maeda2021-10-212-0/+9
| | | | | | | | | | instead Refinement#import_methods imports methods from modules. Unlike Module#include, it copies methods and adds them into the refinement, so the refinement is activated in the imported methods. [Bug #17429] [ruby-core:101639]
* Remove duplicate type qualifiersNobuyoshi Nakada2021-10-062-20/+20
| | | | | `rb_encoding` is defined as `const OnigEncodingType`. Fix lots of C4114 warnings for each files by MSVC.
* Adjust types to rb_enc_left_char_headNobuyoshi Nakada2021-10-051-1/+1
| | | | I dislike unnatural casts.
* rb_enc_left_char_head(): take void*卜部昌平2021-10-051-1/+1
| | | | Nobu doesn't like (char*) cast.
* include/ruby/encoding.h: convert macros into inline functions卜部昌平2021-10-054-105/+366
| | | | Less macros == huge win.
* split include/ruby/encoding.h卜部昌平2021-10-0510-2269/+2563
| | | | | | 2,291 lines are too much! include/ruby/encoding.h became the biggest header file once it had doxygen comments. Let us split it into smaller parts, so that we can better organise their contents.
* rb_ractor_shareable_p(): fix doxygen卜部昌平2021-10-051-2/+3
| | | | | My bad. The document is clearly broken. Maybe I pressed my delete key too much. [ci skip]
* rb_fiber_raise(): add doxygen卜部昌平2021-09-301-9/+23
| | | | Must not be a bad idea to improve documents.
* Introduce `RBIMPL_NONNULL_ARG` macroNobuyoshi Nakada2021-09-271-0/+2
| | | | | Runtime assertion for the argument declared as non-null. This macro does nothing if `RBIMPL_ATTR_NONNULL` is effective, otherwise asserts that the argument is non-null.
* Align the implementation precedences with `rb_atomic_t` definitionNobuyoshi Nakada2021-09-241-0/+12
| | | | | | On MinGW, where both of Win32 API and GCC built-ins are available, the mismatch of implementations to the definition caused lots of warnings.
* RBIMPL_ATTR_NOALIAS: not until LLVM 12卜部昌平2021-09-221-1/+12
| | | | | | | | I observed CI failures. https://github.com/ruby/ruby/actions/runs/1240165911 It turns out that RBIMPL_ATTR_NOALIAS was not mature before. Skip using it for old clang, and everything work as expected.
* include/ruby/atomic.h: rework卜部昌平2021-09-221-278/+664
| | | | | Reduce macros to do the same things in inline functions instead. This way assertions can be made granular.
* Expose `rb_fiber_raise` and tidy up the internal implementation.Samuel Williams2021-09-201-0/+2
|
* include/ruby/atomic.h: add doxygen卜部昌平2021-09-151-1/+257
| | | | Must not be a bad idea to improve documents. [ci skip]
* Suppress deprecated rb_iterate declaration warnings in C++Nobuyoshi Nakada2021-09-111-0/+5
| | | | Apply commit:733ffa74cd32a5c11ff744a5490782daa00ff1ae again.
* Remove printf family from the mjit headerNobuyoshi Nakada2021-09-111-12/+12
| | | | | Linking printf family functions makes mjit objects to link unnecessary code.
* suppress GCC's -Wmissing-attribute卜部昌平2021-09-101-0/+2
| | | | I was not aware of this because I use clang these days.
* rb_ary_new_from_values: can take NULLs卜部昌平2021-09-101-1/+0
| | | | Explicit check done at runtime.
* suppress GCC's -Wsuggest-attribute=format卜部昌平2021-09-101-0/+2
| | | | I was not aware of this because I use clang these days.
* ruby_scan_oct, ruby_scan_hex: are not pure卜部昌平2021-09-101-4/+2
| | | | | | | | | Silly bug, they write back consumed bytes through passed pointers. Must never be pure functions. ruby_scan_oct does not refer any static variables so it can still be __declspec(noalias), while ruby_scan_hex is not because it reads from ruby_digit36_to_number_table.
* ruby_cleanup: fix MSVC compile error卜部昌平2021-09-101-5/+1
| | | | See https://ci.appveyor.com/project/ruby/ruby/builds/40686153/job/1wihxw5m5kybtohj
* include/ruby.h: skip doxygen卜部昌平2021-09-101-1/+0
| | | | | Everything defined in this header file are for backwards compatibility only. No one practically need them any longer. [ci skip]
* include/ruby/backward.h: skip doxygen卜部昌平2021-09-101-1/+0
| | | | There is nothing interesting here. [ci skip]
* include/ruby/debug.h: add doxygen卜部昌平2021-09-101-7/+548
| | | | Must not be a bad idea to improve documents. [ci skip]
* include/ruby/defines.h: add doxygen卜部昌平2021-09-101-1/+9
| | | | | | | | | The only thing that remains in this file which is still worth documenting is the RUBY macro. Everything else were split into many files in https://github.com/ruby/ruby/pull/2991/commits/1ff4cee2b172bf7653c29a8522c132907172b975 [ci skip]
* forgot to delete a redundant comment卜部昌平2021-09-101-1/+0
|