aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/stubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/stubs.c')
-rw-r--r--ext/tk/stubs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c
index 4388fb294d..762fe5ea8d 100644
--- a/ext/tk/stubs.c
+++ b/ext/tk/stubs.c
@@ -6,6 +6,12 @@
#include "ruby.h"
#include "stubs.h"
+
+#if !defined(RSTRING_PTR)
+#define RSTRING_PTR(s) (RSTRING(s)->ptr)
+#define RSTRING_LEN(s) (RSTRING(s)->len)
+#endif
+
#include <tcl.h>
#include <tk.h>