From 6790891ef083b77faaf9d779463dfa0569a96ae5 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 31 Aug 2006 11:56:42 +0000 Subject: * ext/Win32API/Win32API.c (Win32API_initialize): use RSTRING_PTR and RSTRING_LEN. * ext/tk/stubs.c, ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: ditto. * ext/win32ole/win32ole.c (ole_val2olevariantdata): ditto. * lib/mkmf.rb (create_makefile): follow nil.to_s. * win32/resource.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/stubs.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ext/tk/stubs.c') diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c index 654b926e67..426505f3ae 100644 --- a/ext/tk/stubs.c +++ b/ext/tk/stubs.c @@ -140,8 +140,8 @@ ruby_open_tk_dll() char tk_name[20]; if (!tcl_dll) { - /* int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr); */ - int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* int ret = ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */ + int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); if (ret != TCLTK_STUBS_OK) return ret; } @@ -210,8 +210,8 @@ ruby_tcl_create_ip_and_stubs_init(int *st) Tcl_Interp *(*p_Tcl_DeleteInterp)(); if (!tcl_dll) { - /* int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr); */ - int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* int ret = ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */ + int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); if (ret != TCLTK_STUBS_OK) { if (st) *st = ret; @@ -343,8 +343,8 @@ ruby_tcltk_stubs() int st; Tcl_Interp *tcl_ip; - /* st = ruby_open_tcltk_dll(RSTRING(rb_argv0)->ptr); */ - st = ruby_open_tcltk_dll(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* st = ruby_open_tcltk_dll(RSTRING_PTR(rb_argv0)); */ + st = ruby_open_tcltk_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); switch(st) { case NO_FindExecutable: return -7; @@ -405,8 +405,8 @@ ruby_open_tcl_dll(char *appname) int ruby_open_tk_dll() { if (!open_tcl_dll) { - /* ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr); */ - ruby_open_tcl_dll(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */ + ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); } return TCLTK_STUBS_OK; @@ -435,8 +435,8 @@ ruby_tcl_create_ip_and_stubs_init(int *st) Tcl_Interp *tcl_ip; if (!open_tcl_dll) { - /* ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr); */ - ruby_open_tcl_dll(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */ + ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); } if (st) *st = 0; @@ -498,8 +498,8 @@ ruby_tk_stubs_safeinit(Tcl_Interp *tcl_ip) int ruby_tcltk_stubs() { - /* Tcl_FindExecutable(RSTRING(rb_argv0)->ptr); */ - Tcl_FindExecutable(rb_argv0 ? RSTRING(rb_argv0)->ptr : 0); + /* Tcl_FindExecutable(RSTRING_PTR(rb_argv0)); */ + Tcl_FindExecutable(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); return 0; } -- cgit v1.2.3