From: vondruch@... Date: 2009-09-02T23:00:10+09:00 Subject: [ruby-core:25281] Odpověď: [ruby-core:25280] Re: Odpověď: Re: Ruby platform interface Sorry guys, hope this mail is better and this is content of my original post: Hello, While studying win32-unicode-test branch, I wonder why there is no platform independent interface? Code such as #ifdef _WIN32 if (_wchdir((WCHAR *)RSTRING_PTR(path)) < 0) #else if (chdir(RSTRING_PTR(path)) < 0) #endif should actually look as if (pi_chdir(RSTRING_PTR(path)) < 0) where "pi" stands for "platform independent" and later on, there should be in platform specific files macro redefining this call to platform specific call, e.g. in win32.h, there would be #define pi_chdir(p) rb_w32_chdir((WCHAR *)p) in macosx, there would be #define pi_chdir(p) rb_apple_chdir(p) in posix, there would be #define pi_chdir(p) chdir(p) The code is now so much cluttered by platform specific that it is almost unreadable and hard to maintain. Vit Od: Nobuyoshi Nakada Komu: ruby-core@ruby-lang.org Datum: 02.09.2009 14:22 P�edm�t: [ruby-core:25280] Re: Odpov��: Re: Ruby platform interface Odeslal: Nobuyoshi Nakada Hi, At Wed, 2 Sep 2009 21:12:34 +0900, Eero Saynatkari wrote in [ruby-core:25279]: > Excerpts from message of Wed Sep 02 13:03:22 +0300 2009: > > > > Please send mail in plaintext rather than HTML if at > all possible. At least, unak doesn't read HTML mails. -- Nobu Nakada