Data::getSize now uses size_t instead of int

This commit is contained in:
Alex Szpakowski
2014-03-18 03:50:00 -03:00
parent aba17607aa
commit 50916825d0
12 changed files with 42 additions and 46 deletions
+4 -1
View File
@@ -25,6 +25,9 @@
#include "config.h"
#include "Object.h"
// C
#include <stddef.h>
namespace love
{
@@ -49,7 +52,7 @@ public:
/**
* Gets the size of the Data in bytes.
**/
virtual int getSize() const = 0;
virtual size_t getSize() const = 0;
}; // Data
+2 -2
View File
@@ -31,7 +31,7 @@ Data *luax_checkdata(lua_State *L, int idx)
int w_Data_getString(lua_State *L)
{
Data *t = luax_checkdata(L, 1);
lua_pushlstring(L, (const char *) t->getData(), (size_t) t->getSize());
lua_pushlstring(L, (const char *) t->getData(), t->getSize());
return 1;
}
@@ -45,7 +45,7 @@ int w_Data_getPointer(lua_State *L)
int w_Data_getSize(lua_State *L)
{
Data *t = luax_checkdata(L, 1);
lua_pushinteger(L, t->getSize());
lua_pushnumber(L, (lua_Number) t->getSize());
return 1;
}