summaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_byte_array.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
commit2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch)
treeb54d4adac6de0a196b8bb8a67b34fe186c21378f /epan/wslua/wslua_byte_array.c
parentAdding upstream version 4.2.2. (diff)
downloadwireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz
wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--epan/wslua/wslua_byte_array.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/wslua/wslua_byte_array.c b/epan/wslua/wslua_byte_array.c
index 6e6ae304..b0449912 100644
--- a/epan/wslua/wslua_byte_array.c
+++ b/epan/wslua/wslua_byte_array.c
@@ -214,7 +214,7 @@ WSLUA_METHOD ByteArray_get_index(lua_State* L) {
luaL_argerror(L,2,"index out of range");
return 0;
}
- lua_pushnumber(L,ba->data[idx]);
+ lua_pushinteger(L,ba->data[idx]);
WSLUA_RETURN(1); /* The value [0-255] of the byte. */
}
@@ -255,7 +255,7 @@ WSLUA_METHOD ByteArray_le_int(lua_State* L) {
value |= (guint8)ba->data[offset + i];
}
- lua_pushnumber(L, value);
+ lua_pushinteger(L, value);
WSLUA_RETURN(1); /* The value of the little endian encoded signed integer beginning at given offset with given length. */
}
@@ -337,7 +337,7 @@ WSLUA_METHOD ByteArray_le_uint(lua_State* L) {
value |= (guint8)ba->data[offset + i];
}
- lua_pushnumber(L, value);
+ lua_pushinteger(L, value);
WSLUA_RETURN(1); /* The value of the little endian encoded unsigned integer beginning at given offset with given length. */
}
@@ -419,7 +419,7 @@ WSLUA_METHOD ByteArray_int(lua_State* L) {
value |= (guint8)ba->data[offset + i];
}
- lua_pushnumber(L, value);
+ lua_pushinteger(L, value);
WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit signed integer beginning at given offset with given length. */
}
@@ -501,7 +501,7 @@ WSLUA_METHOD ByteArray_uint(lua_State* L) {
value |= (guint8)ba->data[offset + i];
}
- lua_pushnumber(L, value);
+ lua_pushinteger(L, value);
WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit unsigned integer beginning at given offset with given length. */
}
@@ -551,7 +551,7 @@ WSLUA_METHOD ByteArray_len(lua_State* L) {
/* Obtain the length of a <<lua_class_ByteArray,`ByteArray`>>. */
ByteArray ba = checkByteArray(L,1);
- lua_pushnumber(L,(lua_Number)ba->len);
+ lua_pushinteger(L,(lua_Integer)ba->len);
WSLUA_RETURN(1); /* The length of the <<lua_class_ByteArray,`ByteArray`>>. */
}