diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-05 04:41:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-05 04:41:21 +0000 |
commit | de7161526014b781468cea5d84411e23be945f79 (patch) | |
tree | ce7e90b3c16ce6246be9850c9b1ea1328992c0e7 /ext/Win32API/Win32API.c | |
parent | a1d1b1516750c1047ceb7010f8f5ca34b358c7e3 (diff) |
20000105
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/Win32API/Win32API.c')
-rw-r--r-- | ext/Win32API/Win32API.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c index 8efb3ddad6..38268d0474 100644 --- a/ext/Win32API/Win32API.c +++ b/ext/Win32API/Win32API.c @@ -68,9 +68,9 @@ Win32API_initialize(self, dllname, proc, import, export) rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n", RSTRING(proc)->ptr, RSTRING(str)->ptr); } - rb_iv_set(self, "__dll__", INT2NUM((int)hdll)); + rb_iv_set(self, "__dll__", UINT2NUM((unsigned long)hdll)); rb_iv_set(self, "__dllname__", dllname); - rb_iv_set(self, "__proc__", INT2NUM((int)hproc)); + rb_iv_set(self, "__proc__", UINT2NUM((unsigned long)hproc)); a_import = rb_ary_new(); ptr = RARRAY(import)->ptr; @@ -124,7 +124,7 @@ Win32API_Call(argc, argv, obj) ApiVoid *ApiFunctionVoid; ApiInteger *ApiFunctionInteger; - long lParam; + long lParam; char *pParam; VALUE Return; @@ -144,7 +144,7 @@ Win32API_Call(argc, argv, obj) obj_import = rb_iv_get(obj, "__import__"); obj_export = rb_iv_get(obj, "__export__"); - nimport = RARRAY(obj_import)->len; + nimport = RARRAY(obj_import)->len; texport = FIX2INT(obj_export); if (items != nimport) @@ -165,7 +165,7 @@ Win32API_Call(argc, argv, obj) mov eax, lParam push eax } -#elif defined(__CYGWIN32__) || defined(__MINGW32__) +#elif defined(__CYGWIN__) || defined(__MINGW32__) asm volatile ("pushl %0" :: "g" (lParam)); #else #error @@ -184,10 +184,10 @@ Win32API_Call(argc, argv, obj) } #if defined(_MSC_VER) || defined(__LCC__) _asm { - mov eax, dword ptr pParam + mov eax, pParam push eax } -#elif defined(__CYGWIN32__) || defined(__MINGW32__) +#elif defined(__CYGWIN__) || defined(__MINGW32__) asm volatile ("pushl %0" :: "g" (pParam)); #else #error @@ -195,7 +195,6 @@ Win32API_Call(argc, argv, obj) break; } } - } switch (texport) { |