summaryrefslogtreecommitdiff
path: root/ext/Win32API
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-18 08:47:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-18 08:47:06 +0000
commit35f851bcfe7e42ddf1b44606d2df4d4be9de9976 (patch)
tree22b6a55b921d76a6d432f0a2156496ccb827be73 /ext/Win32API
parentcd956b3114c1b59de6660e1c70be192c6ee29235 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/Win32API')
-rw-r--r--ext/Win32API/Win32API.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 0ee28f05ac..65b6a558c1 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;
}