Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
c3f3a048
Commit
c3f3a048
authored
Mar 08, 2014
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use sizeof(void*) instead of mrb_int size and extend embed string size
parent
aa4f3c79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
include/mruby/string.h
include/mruby/string.h
+2
-9
No files found.
include/mruby/string.h
View file @
c3f3a048
...
...
@@ -15,14 +15,7 @@ extern "C" {
extern
const
char
mrb_digitmap
[];
/* (sizeof(mrb_int)*2+sizeof(char*))/sizeof(char)-1 */
#if defined(MRB_INT16)
# define RSTRING_EMBED_LEN_MAX 9
#elif defined(MRB_INT64)
# define RSTRING_EMBED_LEN_MAX 15
#else
# define RSTRING_EMBED_LEN_MAX 11
#endif
#define RSTRING_EMBED_LEN_MAX (sizeof(void*) * 3 - 1)
struct
RString
{
MRB_OBJECT_HEADER
;
...
...
@@ -58,7 +51,7 @@ struct RString {
#define MRB_STR_SHARED 1
#define MRB_STR_NOFREE 2
#define MRB_STR_EMBED 4
#define MRB_STR_EMBED_LEN_MASK
120
#define MRB_STR_EMBED_LEN_MASK
0xf8
#define MRB_STR_EMBED_LEN_SHIFT 3
void
mrb_gc_free_str
(
mrb_state
*
,
struct
RString
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment