diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-18 08:47:06 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-12-18 08:47:06 +0000 |
commit | 80a71ef0c37cb9852382d4662f470d833c57bcf4 (patch) | |
tree | 22b6a55b921d76a6d432f0a2156496ccb827be73 /ext/Win32API/Win32API.c | |
parent | 389789c094a14a17490e8ea32467187758e5a91f (diff) | |
download | ruby-80a71ef0c37cb9852382d4662f470d833c57bcf4.tar.gz ruby-80a71ef0c37cb9852382d4662f470d833c57bcf4.tar.xz ruby-80a71ef0c37cb9852382d4662f470d833c57bcf4.zip |
* string.c (rb_str_replace): swap arguments of OBJ_INFECT.
* eval.c (rb_thread_schedule): should not select a thread which is
not yet initialized.
* time.c (time_plus): wrong boundary check.
* time.c (time_minus): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/Win32API/Win32API.c')
-rw-r--r-- | ext/Win32API/Win32API.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c index 0ee28f05a..65b6a558c 100644 --- a/ext/Win32API/Win32API.c +++ b/ext/Win32API/Win32API.c @@ -64,8 +64,8 @@ Win32API_initialize(self, dllname, proc, import, export) int len; int ex; - Check_SafeStr(dllname); - Check_SafeStr(proc); + SafeStringValue(dllname); + SafeStringValue(proc); hdll = LoadLibrary(RSTRING(dllname)->ptr); if (!hdll) rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr); @@ -90,7 +90,7 @@ Win32API_initialize(self, dllname, proc, import, export) case T_ARRAY: ptr = RARRAY(import)->ptr; for (i = 0, len = RARRAY(import)->len; i < len; i++) { - Check_SafeStr(ptr[i]); + SafeStringValue(ptr[i]); switch (*(char *)RSTRING(ptr[i])->ptr) { case 'N': case 'n': case 'L': case 'l': rb_ary_push(a_import, INT2FIX(_T_NUMBER)); @@ -105,7 +105,7 @@ Win32API_initialize(self, dllname, proc, import, export) } break; default: - Check_SafeStr(import); + SafeStringValue(import); s = RSTRING(import)->ptr; for (i = 0, len = RSTRING(import)->len; i < len; i++) { switch (*s++) { @@ -127,7 +127,7 @@ Win32API_initialize(self, dllname, proc, import, export) if (NIL_P(export)) { ex = _T_VOID; } else { - Check_SafeStr(export); + SafeStringValue(export); switch (*RSTRING(export)->ptr) { case 'V': case 'v': ex = _T_VOID; @@ -228,7 +228,7 @@ Win32API_Call(argc, argv, obj) } else if (FIXNUM_P(str)){ pParam = (char *)NUM2ULONG(str); } else { - Check_Type(str, T_STRING); + StringValue(str); rb_str_modify(str); pParam = RSTRING(str)->ptr; } |