ruby-changes:43723
From: nobu <ko1@a...>
Date: Tue, 2 Aug 2016 11:18:18 +0900 (JST)
Subject: [ruby-changes:43723] nobu:r55796 (trunk): tcltklib.c: remove RUBY_VERSION
nobu 2016-08-02 11:18:14 +0900 (Tue, 02 Aug 2016) New Revision: 55796 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55796 Log: tcltklib.c: remove RUBY_VERSION * ext/tk/tcltklib.c (tcltklib_compile_info): remove RUBY_VERSION, use RUBY_API_VERSION instead. Modified files: trunk/ext/tk/extconf.rb trunk/ext/tk/tcltklib.c Index: ext/tk/tcltklib.c =================================================================== --- ext/tk/tcltklib.c (revision 55795) +++ ext/tk/tcltklib.c (revision 55796) @@ -12,11 +12,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L12 #ifdef HAVE_RUBY_ENCODING_H #include "ruby/encoding.h" #endif -#ifndef RUBY_VERSION -#define RUBY_VERSION "(unknown version)" -#endif -#ifndef RUBY_RELEASE_DATE -#define RUBY_RELEASE_DATE "unknown release-date" +#ifdef HAVE_RUBY_VERSION_H +#include "ruby/version.h" #endif #undef RUBY_UNTYPED_DATA_WARNING @@ -10001,7 +9998,17 @@ tcltklib_compile_info(void) https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L9998 VALUE ret; static const char info[] = "tcltklib " TCLTKLIB_RELEASE_DATE " " - ":: Ruby" RUBY_VERSION" ("RUBY_RELEASE_DATE") " + ":: Ruby" +#ifdef RUBY_API_VERSION_MAJOR + STRINGIZE(RUBY_API_VERSION_MAJOR)"." + STRINGIZE(RUBY_API_VERSION_MINOR)"." + STRINGIZE(RUBY_API_VERSION_TEENY)" " +#else + RUBY_VERSION" " +#endif +#ifdef RUBY_RELEASE_DATE + "("RUBY_RELEASE_DATE") " +#endif #ifdef HAVE_NATIVETHREAD "with" #else Index: ext/tk/extconf.rb =================================================================== --- ext/tk/extconf.rb (revision 55795) +++ ext/tk/extconf.rb (revision 55796) @@ -2085,10 +2085,6 @@ if (TkLib_Config["tcltk-framework"] || https://github.com/ruby/ruby/blob/trunk/ext/tk/extconf.rb#L2085 $INSTALLFILES ||= [] $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"] - # create - $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] - $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"] - # remove harmful definitions. $defs.delete_if{|x|/^-Du?intptr_t=/ =~ x} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/