summaryrefslogtreecommitdiff
path: root/ext/Win32API/Win32API.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Win32API/Win32API.c')
-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;
}