summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/string.c b/src/string.c
index ac50dd33e..aa4f6bed5 100644
--- a/src/string.c
+++ b/src/string.c
@@ -5,6 +5,7 @@
*/
#include <ctype.h>
+#include <float.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
@@ -165,13 +166,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len)
#define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
-/* char offset to byte offset */
-int
-mrb_str_offset(mrb_state *mrb, mrb_value str, int pos)
-{
- return pos;
-}
-
static struct RString*
str_new(mrb_state *mrb, const char *p, size_t len)
{
@@ -2159,9 +2153,6 @@ mrb_cstr_to_dbl(mrb_state *mrb, const char * p, mrb_bool badcheck)
{
char *end;
double d;
-#if !defined(DBL_DIG)
-# define DBL_DIG 16
-#endif
enum {max_width = 20};
#define OutOfRange() (((w = end - p) > max_width) ? \