From d468e3e67b3b9a327a41fe5c1c71754a75dab7ef Mon Sep 17 00:00:00 2001 From: Mauro Iazzi Date: Fri, 23 May 2008 17:29:44 +0200 Subject: [PATCH] fixed Q.*F to use numbers instead of doubles --- new/types.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/new/types.lua b/new/types.lua index 74a657e..d9fe95c 100644 --- a/new/types.lua +++ b/new/types.lua @@ -111,9 +111,9 @@ base_types['QPoint'] = { base_types['QPoint const&'] = base_types['QPoint'] base_types['QPointF'] = { - get = function(i) return 'QPointF(lua_tointeger(L, '..i..'), lua_tointeger(L, '..i..'+1))', 2 end, - push = function(i) return 'lua_pushinteger(L, '..i..'.x()), lua_pushinteger(L, '..i..'.y())', 2 end, - test = function(i) return '(lqtL_isinteger(L, '..i..') && lqtL_isinteger(L, '..i..'+1))', 2 end, + get = function(i) return 'QPointF(lua_tonumber(L, '..i..'), lua_tonumber(L, '..i..'+1))', 2 end, + push = function(i) return 'lua_pushnumber(L, '..i..'.x()), lua_pushnumber(L, '..i..'.y())', 2 end, + test = function(i) return '(lqtL_isnumber(L, '..i..') && lqtL_isnumber(L, '..i..'+1))', 2 end, } base_types['QPointF const&'] = base_types['QPointF'] @@ -125,9 +125,9 @@ base_types['QRect'] = { base_types['QRect const&'] = base_types['QRect'] base_types['QRectF'] = { - get = function(i) return 'QRectF(lua_tointeger(L, '..i..'), lua_tointeger(L, '..i..'+1), lua_tointeger(L, '..i..'+2), lua_tointeger(L, '..i..'+3))', 4 end, - push = function(i) return 'lua_pushinteger(L, '..i..'.x()), lua_pushinteger(L, '..i..'.y()), lua_pushinteger(L, '..i..'.width()), lua_pushinteger(L, '..i..'.height())', 4 end, - test = function(i) return '(lqtL_isinteger(L, '..i..') && lqtL_isinteger(L, '..i..'+1) && lqtL_isinteger(L, '..i..'+2) && lqtL_isinteger(L, '..i..'+3))', 4 end, + get = function(i) return 'QRectF(lua_tonumber(L, '..i..'), lua_tonumber(L, '..i..'+1), lua_tonumber(L, '..i..'+2), lua_tonumber(L, '..i..'+3))', 4 end, + push = function(i) return 'lua_pushnumber(L, '..i..'.x()), lua_pushnumber(L, '..i..'.y()), lua_pushnumber(L, '..i..'.width()), lua_pushnumber(L, '..i..'.height())', 4 end, + test = function(i) return '(lqtL_isnumber(L, '..i..') && lqtL_isnumber(L, '..i..'+1) && lqtL_isnumber(L, '..i..'+2) && lqtL_isnumber(L, '..i..'+3))', 4 end, } base_types['QRectF const&'] = base_types['QRectF'] -- 2.11.4.GIT