summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/array.c1
-rw-r--r--src/encoding.h2
-rw-r--r--src/etc.c1
-rw-r--r--src/gc.c2
-rw-r--r--src/kernel.c1
-rw-r--r--src/mdata.h53
-rw-r--r--src/object.c1
7 files changed, 2 insertions, 59 deletions
diff --git a/src/array.c b/src/array.c
index 855a45aba..69f5fd8b3 100644
--- a/src/array.c
+++ b/src/array.c
@@ -2,7 +2,6 @@
#include "mruby/array.h"
#include <string.h>
#include "mruby/string.h"
-#include "mdata.h"
#include "mruby/class.h"
#ifdef INCLUDE_REGEXP
diff --git a/src/encoding.h b/src/encoding.h
index 784d67f44..92e16e5f2 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -18,7 +18,7 @@ extern "C" {
#include <stdarg.h>
#include "oniguruma.h"
-#include "mdata.h"
+#include "mruby/data.h"
int mrb_tolower(int c);
int mrb_toupper(int c);
diff --git a/src/etc.c b/src/etc.c
index 8c98700a3..865992566 100644
--- a/src/etc.c
+++ b/src/etc.c
@@ -1,5 +1,4 @@
#include "mruby.h"
-#include "mdata.h"
#include "mruby/string.h"
#include "error.h"
#include "mruby/numeric.h"
diff --git a/src/gc.c b/src/gc.c
index e4b1f82ba..f4186f6e3 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "mruby/struct.h"
#include "mruby/proc.h"
-#include "mdata.h"
+#include "mruby/data.h"
#include "mruby/numeric.h"
/*
diff --git a/src/kernel.c b/src/kernel.c
index e5b2cab04..7a4a13501 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -14,7 +14,6 @@
#include "ritehash.h"
#include "error.h"
#include "method.h"
-#include "mdata.h"
#ifdef INCLUDE_REGEXP
#include "re.h"
diff --git a/src/mdata.h b/src/mdata.h
deleted file mode 100644
index 827f7c114..000000000
--- a/src/mdata.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**********************************************************************
-
- mdata.h -
-
-
- Copyright (C) 2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_DATA_H
-#define RUBY_DATA_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-
-struct mrb_data_type {
- const char *struct_name;
- void (*dfree)(mrb_state *mrb, void*);
-};
-
-struct RData {
- MRUBY_OBJECT_HEADER;
- struct kh_iv *iv;
- struct mrb_data_type *type;
- void *data;
-};
-
-struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void *datap, const struct mrb_data_type *type);
-
-#define Data_Wrap_Struct(mrb,klass,type,ptr)\
- mrb_data_object_alloc(mrb,klass,ptr,type)
-
-#define Data_Make_Struct(mrb,klass,strct,type,sval) (\
- sval = mrb_malloc(mrb, sizeof(strct)),\
- memset(sval, 0, sizeof(strct)),\
- Data_Wrap_Struct(mrb,klass,type,sval)\
-)
-
-#define RDATA(obj) ((struct RData *)((obj).value.p))
-#define DATA_PTR(d) (RDATA(d)->data)
-#define DATA_TYPE(d) (RDATA(d)->type)
-void *mrb_check_datatype(mrb_state *mrb, mrb_value, const struct mrb_data_type*);
-#define Data_Get_Struct(mrb,obj,type,sval) do {\
- sval = mrb_check_datatype(mrb, obj, type); \
-} while (0)
-
-#if defined(__cplusplus)
-} /* extern "C" { */
-#endif
-
-#endif /* RUBY_DATA_H */
diff --git a/src/object.c b/src/object.c
index c60c2fb7b..0a31fa108 100644
--- a/src/object.c
+++ b/src/object.c
@@ -5,7 +5,6 @@
#include "mruby/class.h"
#include "method.h"
#include "mruby/numeric.h"
-#include "mdata.h"
#ifdef INCLUDE_REGEXP
#define mrb_usascii_str_new2 mrb_usascii_str_new_cstr