[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cinvoke-dev] strtol cast in cinvoke_lua.c
From: |
Shmuel Zeigerman |
Subject: |
[cinvoke-dev] strtol cast in cinvoke_lua.c |
Date: |
Tue, 15 Aug 2006 17:55:23 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060729 SeaMonkey/1.0.4 |
What's the purpose of the following conditional define
in the function 'get_ptr_val' in 'cinvoke_lua.c'?
#ifdef _WIN32
ret = (void *)(long long)strtol(pstr, &endptr, 16);
#else
ret = (void *)strtol(pstr, &endptr, 16);
#endif
a) GCC on Windows issues a warning:
[Warning] cast to pointer from integer of different size
b) I compiled on Windows without the (long long) cast,
and cinvoke_lua.dll seems to work just fine.
Am I missing something?
Thank you.
--
Shmuel
- [cinvoke-dev] strtol cast in cinvoke_lua.c,
Shmuel Zeigerman <=