summaryrefslogtreecommitdiff
path: root/plugins/MirLua/Modules
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /plugins/MirLua/Modules
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/MirLua/Modules')
-rwxr-xr-xplugins/MirLua/Modules/WinAPI/src/winapi.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
index 8ef0708d7d..9078149efe 100755
--- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
+++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
@@ -207,12 +207,12 @@ static int lua_GetRegValue(lua_State *L)
DWORD type = 0;
DWORD length = 1024;
- BYTE* value = (BYTE*)mir_alloc(length);
+ uint8_t* value = (uint8_t*)mir_alloc(length);
res = ::RegQueryValueEx(hKey, valueName, nullptr, &type, (LPBYTE)value, &length);
while (res == ERROR_MORE_DATA)
{
length += length;
- value = (BYTE*)mir_realloc(value, length);
+ value = (uint8_t*)mir_realloc(value, length);
res = ::RegQueryValueEx(hKey, valueName, nullptr, &type, (LPBYTE)value, &length);
}
@@ -268,7 +268,7 @@ static int lua_SetRegValue(lua_State *L)
DWORD type = 0;
DWORD length = 0;
- BYTE* value = nullptr;
+ uint8_t* value = nullptr;
switch (lua_type(L, 4))
{
case LUA_TNUMBER:
@@ -276,21 +276,21 @@ static int lua_SetRegValue(lua_State *L)
{
type = REG_DWORD;
length = sizeof(DWORD);
- value = (BYTE*)lua_tointeger(L, 4);
+ value = (uint8_t*)lua_tointeger(L, 4);
}
else
{
type = REG_QWORD;
length = sizeof(DWORD) * 2;
lua_Number num = lua_tonumber(L, 4);
- value = (BYTE*)&num;
+ value = (uint8_t*)&num;
}
break;
case LUA_TSTRING:
type = REG_SZ;
length = mir_strlen(lua_tostring(L, 4)) * sizeof(wchar_t);
- value = (BYTE*)mir_utf8decodeW(lua_tostring(L, 4));
+ value = (uint8_t*)mir_utf8decodeW(lua_tostring(L, 4));
break;
default:
@@ -1216,9 +1216,9 @@ static int global_RegSetValueEx(lua_State *L) {
rv = RegCreateKeyExA(hkey, subkey, 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &hsk, nullptr);
if (rv == ERROR_SUCCESS) {
if (szdata == nullptr)
- rv = RegSetValueExA(hsk, valuename, 0, type, (CONST BYTE *) &dwdata, sizeof(dwdata));
+ rv = RegSetValueExA(hsk, valuename, 0, type, (CONST uint8_t *) &dwdata, sizeof(dwdata));
else
- rv = RegSetValueExA(hsk, valuename, 0, type, (CONST BYTE *) szdata, len + 1);
+ rv = RegSetValueExA(hsk, valuename, 0, type, (CONST uint8_t *) szdata, len + 1);
lua_pushboolean(L, rv == ERROR_SUCCESS);
RegCloseKey(hsk);
}