Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2012-09-05 16:09:46 +0400
committermoteus <mimir@newmail.ru>2012-09-05 16:09:46 +0400
commit46a94cbb43975e06bdb66f47974d09d7b3b36a22 (patch)
treeee7e36b7ec56d3f7de6367122d7b7f6ec72eb13f /src/winreg.c
parente52ac7f6beaf32bdebb7e3af33448e79df5cc6b6 (diff)
Support Lua 5.2
Add tests from http://scite-ru.googlecode.com/ Add lakefile
Diffstat (limited to 'src/winreg.c')
-rw-r--r--src/winreg.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/winreg.c b/src/winreg.c
index e3aafb3..5257166 100644
--- a/src/winreg.c
+++ b/src/winreg.c
@@ -5,13 +5,10 @@
#include <assert.h>
#define lua_assert assert
-#ifndef uintptr_t
- typedef unsigned uintptr_t;
-#endif
-
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
+#include "l52util.h"
#include "stdmacro.h"
#include "luamacro.h"
@@ -138,7 +135,7 @@ HKEY reg_aux_strtohkey(lua_State *L, const char * psz){
INT64 x;
if(atoINT64(psz, &x)){
WIN_TRACEA("DIGIT ROOTKEY %s", psz);
- return (HKEY)(uintptr_t)x;
+ return (HKEY)(size_t)x;
}else{
for(pph = ph; pph->name && stricmp(psz, pph->name); pph++);
if(!pph->data)luaL_error(L, "invalid prefix key '%s'", psz);
@@ -283,7 +280,7 @@ BOOL reg_aux_setvalue(lua_State *L, HKEY hKey, const TCHAR * pszVal, int type, i
luaL_buffinit(L, &B);
if(lua_istable(L, i)){
int n;
- int last = luaL_getn(L, i);
+ int last = lua_objlen(L, i);
for (n = 1; n <= last; n++) {
lua_rawgeti(L, i, n);
luaL_addstring(&B, lua_checkstring(L, -1));