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
091c209c
Commit
091c209c
authored
Feb 21, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #865 from brainopia/mrbconf
Clean up mrbconf.h
parents
1418f964
483dce4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
25 deletions
+16
-25
include/mrbconf.h
include/mrbconf.h
+16
-25
No files found.
include/mrbconf.h
View file @
091c209c
...
...
@@ -54,48 +54,39 @@
/* Now DISABLE_GEMS is added as a command line flag in Rakefile, */
/* we do not need to set it here. */
#undef HAVE_UNISTD_H
/* WINDOWS */
//
#undef HAVE_UNISTD_H /* WINDOWS */
#define HAVE_UNISTD_H
/* LINUX */
/* end of configuration */
#ifdef MRB_USE_FLOAT
typedef
float
mrb_float
;
# define mrb_float_to_str(buf, i) sprintf(
(buf), "%.7e", (i)
)
# define str_to_mrb_float(buf)
(mrb_float)strtof((buf),
NULL)
# define mrb_float_to_str(buf, i) sprintf(
buf, "%.7e", i
)
# define str_to_mrb_float(buf)
strtof(buf,
NULL)
#else
typedef
double
mrb_float
;
# define mrb_float_to_str(buf, i) sprintf(
(buf), "%.16e", (i)
)
# define str_to_mrb_float(buf)
(mrb_float)strtod((buf),
NULL)
# define mrb_float_to_str(buf, i) sprintf(
buf, "%.16e", i
)
# define str_to_mrb_float(buf)
strtod(buf,
NULL)
#endif
#ifdef MRB_
NAN_BOXING
# ifdef MRB_
INT64
#ifdef MRB_
INT64
# ifdef MRB_
NAN_BOXING
# error Cannot use NaN boxing when mrb_int is 64bit
# else
typedef
int32_t
mrb_int
;
# define MRB_INT_MIN INT32_MIN
# define MRB_INT_MAX INT32_MAX
# define MRB_INT_FORMAT PRId32
# define mrb_int_to_str(buf, i) sprintf((buf), "%" MRB_INT_FORMAT, (i))
# define str_to_mrb_int(buf) (mrb_int)strtol((buf), NULL, 10)
# endif
#else
# ifdef MRB_INT64
typedef
int64_t
mrb_int
;
# define MRB_INT_MIN INT64_MIN
# define MRB_INT_MAX INT64_MAX
# define MRB_INT_FORMAT PRId64
# define mrb_int_to_str(buf, i) sprintf((buf), "%" MRB_INT_FORMAT, (i))
# define str_to_mrb_int(buf) (mrb_int)strtoll((buf), NULL, 10)
# else
typedef
int32_t
mrb_int
;
# define MRB_INT_MIN INT32_MIN
# define MRB_INT_MAX INT32_MAX
# define MRB_INT_FORMAT PRId32
# define mrb_int_to_str(buf, i) sprintf((buf), "%" MRB_INT_FORMAT, (i))
# define str_to_mrb_int(buf) (mrb_int)strtol((buf), NULL, 10)
# define mrb_int_to_str(buf, i) sprintf(buf, "%" MRB_INT_FORMAT, i)
# define str_to_mrb_int(buf) strtoll(buf, NULL, 10)
# endif
#else
typedef
int32_t
mrb_int
;
# define MRB_INT_MIN INT32_MIN
# define MRB_INT_MAX INT32_MAX
# define MRB_INT_FORMAT PRId32
# define mrb_int_to_str(buf, i) sprintf(buf, "%" MRB_INT_FORMAT, i)
# define str_to_mrb_int(buf) strtol(buf, NULL, 10)
#endif
typedef
short
mrb_sym
;
...
...
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