ruby-changes:13706
From: nagai <ko1@a...>
Date: Tue, 27 Oct 2009 07:40:18 +0900 (JST)
Subject: [ruby-changes:13706] Ruby:r25495 (ruby_1_8): * ext/tk/tcltklib.c,stubs.c: remove errors or warnings when compiled
nagai 2009-10-27 07:40:02 +0900 (Tue, 27 Oct 2009) New Revision: 25495 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25495 Log: * ext/tk/tcltklib.c,stubs.c: remove errors or warnings when compiled with old ruby 1.8.x. * ext/tk/tkutil/tkutil.c: ditto. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/ext/tk/stubs.c branches/ruby_1_8/ext/tk/tcltklib.c branches/ruby_1_8/ext/tk/tkutil/tkutil.c Index: ruby_1_8/ext/tk/stubs.c =================================================================== --- ruby_1_8/ext/tk/stubs.c (revision 25494) +++ ruby_1_8/ext/tk/stubs.c (revision 25495) @@ -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> Index: ruby_1_8/ext/tk/tcltklib.c =================================================================== --- ruby_1_8/ext/tk/tcltklib.c (revision 25494) +++ ruby_1_8/ext/tk/tcltklib.c (revision 25495) @@ -4,7 +4,7 @@ * Oct. 24, 1997 Y. Matsumoto */ -#define TCLTKLIB_RELEASE_DATE "2009-08-04" +#define TCLTKLIB_RELEASE_DATE "2009-10-27" #include "ruby.h" @@ -24,6 +24,15 @@ #include "rubysig.h" #endif +a#if !defined(RSTRING_PTR) +#define RSTRING_PTR(s) (RSTRING(s)->ptr) +#define RSTRING_LEN(s) (RSTRING(s)->len) +#endif +#if !defined(RARRAY_PTR) +#define RARRAY_PTR(s) (RARRAY(s)->ptr) +#define RARRAY_LEN(s) (RARRAY(s)->len) +#endif + #ifdef OBJ_UNTRUST #define RbTk_OBJ_UNTRUST(x) do {OBJ_TAINT(x); OBJ_UNTRUST(x);} while (0) #else Index: ruby_1_8/ext/tk/tkutil/tkutil.c =================================================================== --- ruby_1_8/ext/tk/tkutil/tkutil.c (revision 25494) +++ ruby_1_8/ext/tk/tkutil/tkutil.c (revision 25495) @@ -7,7 +7,7 @@ ************************************************/ -#define TKUTIL_RELEASE_DATE "2009-07-12" +#define TKUTIL_RELEASE_DATE "2009-10-27" #include "ruby.h" @@ -23,6 +23,22 @@ #include "st.h" #endif +#if !defined(RHASH_TBL) +#define RHASH_TBL(h) (RHASH(h)->tbl) +#endif +#if !defined(RSTRING_PTR) +#define RSTRING_PTR(s) (RSTRING(s)->ptr) +#define RSTRING_LEN(s) (RSTRING(s)->len) +#endif +#if !defined(RARRAY_PTR) +#define RARRAY_PTR(s) (RARRAY(s)->ptr) +#define RARRAY_LEN(s) (RARRAY(s)->len) +#endif + +#if defined(HAVE_STRNDUP) && !defined(_GNU_SOURCE) +extern char *strndup(const char* _ptr, size_t _len); +#endif + static VALUE cMethod; static VALUE cTclTkLib; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25494) +++ ruby_1_8/ChangeLog (revision 25495) @@ -1,3 +1,10 @@ +Tue Oct 27 07:38:39 2009 Hidetoshi NAGAI <nagai@a...> + + * ext/tk/tcltklib.c,stubs.c: remove errors or warnings when compiled + with old ruby 1.8.x. + + * ext/tk/tkutil/tkutil.c: ditto. + Mon Oct 26 13:24:17 2009 Hidetoshi NAGAI <nagai@a...> * ext/tk/lib/remote-tk.rb: typo fixed. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/