mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Feature #18239] Implement VWA for strings
This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings.
This commit is contained in:
parent
6374be5a81
commit
a5b6598192
Notes:
git
2021-10-26 02:26:49 +09:00
16 changed files with 453 additions and 172 deletions
7
ruby.c
7
ruby.c
|
@ -566,7 +566,12 @@ static VALUE
|
|||
runtime_libruby_path(void)
|
||||
{
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
DWORD len = RSTRING_EMBED_LEN_MAX, ret;
|
||||
DWORD len, ret;
|
||||
#if USE_RVARGC
|
||||
len = 32;
|
||||
#else
|
||||
len = RSTRING_EMBED_LEN_MAX;
|
||||
#endif
|
||||
VALUE path;
|
||||
VALUE wsopath = rb_str_new(0, len*sizeof(WCHAR));
|
||||
WCHAR *wlibpath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue