aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_tvb.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-05-08 16:40:38 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-05-08 16:40:38 +0000
commit3dc9b64560c53044e213ca8486c71c64265dfe37 (patch)
treeff445a8588defa1cbb31e02f932812aeecb39f8c /epan/wslua/wslua_tvb.c
parentba2e20b5d80354f5125c85c6156b0902938cd140 (diff)
Adjusted arguments used in Lua Pref.statictext()
Update Lua documentation: - Fixed Pref.enum, Pref.range and Pref.statictext - Fixed the equivalent comment for pinfo.cols - Do not have a comment star (*) in the documentation - Be consistent and start all sentences with a capital letter svn path=/trunk/; revision=28304
Diffstat (limited to 'epan/wslua/wslua_tvb.c')
-rw-r--r--epan/wslua/wslua_tvb.c142
1 files changed, 70 insertions, 72 deletions
diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c
index d19e0f42a7..56d0714898 100644
--- a/epan/wslua/wslua_tvb.c
+++ b/epan/wslua/wslua_tvb.c
@@ -33,7 +33,7 @@
WSLUA_CLASS_DEFINE(ByteArray,FAIL_ON_NULL("null bytearray"),NOP);
-WSLUA_CONSTRUCTOR ByteArray_new(lua_State* L) { /* creates a ByteArray Object */
+WSLUA_CONSTRUCTOR ByteArray_new(lua_State* L) { /* Creates a ByteArray Object */
#define WSLUA_OPTARG_ByteArray_new_HEXBYTES 1 /* A string consisting of hexadecimal bytes like "00 B1 A2" or "1a2b3c4d" */
GByteArray* ba = g_byte_array_new();
const gchar* s;
@@ -88,15 +88,15 @@ static int ByteArray_gc(lua_State* L) {
}
WSLUA_METAMETHOD ByteArray__concat(lua_State* L) {
- /* concatenate two ByteArrays */
-#define WSLUA_ARG_ByteArray__cat_FIRST 1 /* first array */
-#define WSLUA_ARG_ByteArray__cat_SECOND 2 /* second array */
+ /* Concatenate two ByteArrays */
+#define WSLUA_ARG_ByteArray__cat_FIRST 1 /* First array */
+#define WSLUA_ARG_ByteArray__cat_SECOND 2 /* Second array */
ByteArray ba = checkByteArray(L,WSLUA_ARG_ByteArray__cat_FIRST);
ByteArray ba2 = checkByteArray(L,WSLUA_ARG_ByteArray__cat_SECOND);
if (! (ba && ba2) )
- WSLUA_ERROR(ByteArray__cat,"both arguments must be ByteArrays");
+ WSLUA_ERROR(ByteArray__cat,"Both arguments must be ByteArrays");
g_byte_array_append(ba,ba2->data,ba2->len);
@@ -105,13 +105,13 @@ WSLUA_METAMETHOD ByteArray__concat(lua_State* L) {
}
WSLUA_METHOD ByteArray_prepend(lua_State* L) {
- /* prepend a ByteArray to this ByteArray */
-#define WSLUA_ARG_ByteArray_prepend_PREPENDED 2 /* array to be prepended */
+ /* Prepend a ByteArray to this ByteArray */
+#define WSLUA_ARG_ByteArray_prepend_PREPENDED 2 /* Array to be prepended */
ByteArray ba = checkByteArray(L,1);
ByteArray ba2 = checkByteArray(L,WSLUA_ARG_ByteArray_prepend_PREPENDED);
if (! (ba && ba2) )
- WSLUA_ERROR(ByteArray_prepend,"both arguments must be ByteArrays");
+ WSLUA_ERROR(ByteArray_prepend,"Both arguments must be ByteArrays");
g_byte_array_prepend(ba,ba2->data,ba2->len);
@@ -120,13 +120,13 @@ WSLUA_METHOD ByteArray_prepend(lua_State* L) {
}
WSLUA_METHOD ByteArray_append(lua_State* L) {
- /* append a ByteArray to this ByteArray */
-#define WSLUA_ARG_ByteArray_append_APPENDED 2 /* array to be appended */
+ /* Append a ByteArray to this ByteArray */
+#define WSLUA_ARG_ByteArray_append_APPENDED 2 /* Array to be appended */
ByteArray ba = checkByteArray(L,1);
ByteArray ba2 = checkByteArray(L,WSLUA_ARG_ByteArray_append_APPENDED);
if (! (ba && ba2) )
- WSLUA_ERROR(ByteArray_append,"both arguments must be ByteArrays");
+ WSLUA_ERROR(ByteArray_append,"Both arguments must be ByteArrays");
g_byte_array_append(ba,ba2->data,ba2->len);
@@ -136,7 +136,7 @@ WSLUA_METHOD ByteArray_append(lua_State* L) {
WSLUA_METHOD ByteArray_set_size(lua_State* L) {
/* Sets the size of a ByteArray, either truncating it or filling it with zeros. */
-#define WSLUA_ARG_ByteArray_set_size_SIZE 2 /* new size of the array*/
+#define WSLUA_ARG_ByteArray_set_size_SIZE 2 /* New size of the array*/
ByteArray ba = checkByteArray(L,1);
int siz = luaL_checkint(L,WSLUA_ARG_ByteArray_set_size_SIZE);
@@ -159,9 +159,9 @@ WSLUA_METHOD ByteArray_set_size(lua_State* L) {
}
WSLUA_METHOD ByteArray_set_index(lua_State* L) {
- /* sets the value of an index of a ByteArray. */
-#define WSLUA_ARG_ByteArray_set_index_INDEX 2 /* the position of the byte to be set */
-#define WSLUA_ARG_ByteArray_set_index_VALUE 3 /* the char value to set [0-255] */
+ /* Sets the value of an index of a ByteArray. */
+#define WSLUA_ARG_ByteArray_set_index_INDEX 2 /* The position of the byte to be set */
+#define WSLUA_ARG_ByteArray_set_index_VALUE 3 /* The char value to set [0-255] */
ByteArray ba = checkByteArray(L,1);
int idx = luaL_checkint(L,WSLUA_ARG_ByteArray_set_index_INDEX);
int v = luaL_checkint(L,WSLUA_ARG_ByteArray_set_index_VALUE);
@@ -190,8 +190,8 @@ WSLUA_METHOD ByteArray_set_index(lua_State* L) {
WSLUA_METHOD ByteArray_get_index(lua_State* L) {
- /* get the value of a byte in a ByteArray */
-#define WSLUA_ARG_ByteArray_set_index_INDEX 2 /* the position of the byte to be set */
+ /* Set the value of a byte in a ByteArray */
+#define WSLUA_ARG_ByteArray_set_index_INDEX 2 /* The position of the byte to be set */
ByteArray ba = checkByteArray(L,1);
int idx = luaL_checkint(L,WSLUA_ARG_ByteArray_set_index_INDEX);
@@ -212,7 +212,7 @@ WSLUA_METHOD ByteArray_get_index(lua_State* L) {
}
WSLUA_METHOD ByteArray_len(lua_State* L) {
- /* obtain the length of a ByteArray */
+ /* Obtain the length of a ByteArray */
ByteArray ba = checkByteArray(L,1);
if (!ba) return 0;
@@ -223,9 +223,9 @@ WSLUA_METHOD ByteArray_len(lua_State* L) {
}
WSLUA_METHOD ByteArray_subset(lua_State* L) {
- /* obtain a segment of a ByteArray */
-#define WSLUA_ARG_ByteArray_set_index_OFFSET 2 /* the position of the first byte */
-#define WSLUA_ARG_ByteArray_set_index_LENGTH 3 /* the length of the segment */
+ /* Obtain a segment of a ByteArray */
+#define WSLUA_ARG_ByteArray_set_index_OFFSET 2 /* The position of the first byte */
+#define WSLUA_ARG_ByteArray_set_index_LENGTH 3 /* The length of the segment */
ByteArray ba = checkByteArray(L,1);
int offset = luaL_checkint(L,WSLUA_ARG_ByteArray_set_index_OFFSET);
int len = luaL_checkint(L,WSLUA_ARG_ByteArray_set_index_LENGTH);
@@ -243,11 +243,11 @@ WSLUA_METHOD ByteArray_subset(lua_State* L) {
pushByteArray(L,sub);
- WSLUA_RETURN(1); /* a ByteArray contaning the requested segment. */
+ WSLUA_RETURN(1); /* A ByteArray contaning the requested segment. */
}
static int ByteArray_tostring(lua_State* L) {
- /* obtain a string containing the bytes in a ByteArray so that it can be used in display filters (e.g. "01:23:45:67:89:AB") */
+ /* Obtain a string containing the bytes in a ByteArray so that it can be used in display filters (e.g. "01:23:45:67:89:AB") */
static const gchar* byte_to_str[] = {
"00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F",
"10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F",
@@ -281,7 +281,7 @@ static int ByteArray_tostring(lua_State* L) {
lua_pushstring(L,s->str);
g_string_free(s,TRUE);
- WSLUA_RETURN(1); /* a string contaning a representaion of the ByteArray. */
+ WSLUA_RETURN(1); /* A string contaning a representaion of the ByteArray. */
}
static int Tvb_new_real (lua_State *L);
@@ -337,7 +337,7 @@ int ByteArray_register(lua_State* L) {
*/
WSLUA_CLASS_DEFINE(Tvb,FAIL_ON_NULL("expired tvb"),NOP);
-/* a Tvb represents the packet's buffer. It is passed as an argument to listeners and dissectors,
+/* A Tvb represents the packet's buffer. It is passed as an argument to listeners and dissectors,
and can be used to extract information (via TvbRange) from the packet's data. Beware that Tvbs are usable only by the current
listener or dissector call and are destroyed as soon as the listener/dissector returns, so references
to them are unusable once the function has returned.
@@ -390,12 +390,12 @@ WSLUA_CONSTRUCTOR Tvb_new_real (lua_State *L) {
add_new_data_source(lua_pinfo, tvb->ws_tvb, name);
PUSH_TVB(L,tvb);
- WSLUA_RETURN(1); /* the created Tvb. */
+ WSLUA_RETURN(1); /* The created Tvb. */
}
WSLUA_CONSTRUCTOR Tvb_tvb (lua_State *L) {
- /* creates a (sub)Tvb from using a TvbRange */
-#define WSLUA_ARG_Tvb_new_subset_RANGE 1 /* the TvbRange from which to create the new Tvb. */
+ /* Creates a (sub)Tvb from using a TvbRange */
+#define WSLUA_ARG_Tvb_new_subset_RANGE 1 /* The TvbRange from which to create the new Tvb. */
TvbRange tvbr = checkTvbRange(L,WSLUA_ARG_Tvb_new_subset_RANGE);
Tvb tvb;
@@ -419,7 +419,7 @@ WSLUA_CONSTRUCTOR Tvb_tvb (lua_State *L) {
}
WSLUA_METAMETHOD Tvb__tostring(lua_State* L) {
- /* convert the bytes of a Tvb into a string, to be used for debugging purposes as '...' will be appended in case the string is too long. */
+ /* Convert the bytes of a Tvb into a string, to be used for debugging purposes as '...' will be appended in case the string is too long. */
Tvb tvb = checkTvb(L,1);
int len;
gchar* str;
@@ -433,7 +433,7 @@ WSLUA_METAMETHOD Tvb__tostring(lua_State* L) {
len = tvb_length(tvb->ws_tvb);
str = ep_strdup_printf("TVB(%i) : %s",len,tvb_bytes_to_str(tvb->ws_tvb,0,len));
lua_pushstring(L,str);
- WSLUA_RETURN(1); /* the string. */
+ WSLUA_RETURN(1); /* The string. */
}
static int Tvb__gc(lua_State* L) {
@@ -451,7 +451,7 @@ static int Tvb__gc(lua_State* L) {
}
WSLUA_METHOD Tvb_len(lua_State* L) {
- /* obtain the length of a TVB */
+ /* Obtain the length of a TVB */
Tvb tvb = checkTvb(L,1);
if (!tvb) return 0;
@@ -461,11 +461,11 @@ WSLUA_METHOD Tvb_len(lua_State* L) {
}
lua_pushnumber(L,tvb_length(tvb->ws_tvb));
- WSLUA_RETURN(1); /* the length of the Tvb. */
+ WSLUA_RETURN(1); /* The length of the Tvb. */
}
WSLUA_METHOD Tvb_offset(lua_State* L) {
- /* returns the raw offset (from the beginning of the source Tvb) of a sub Tvb. */
+ /* Returns the raw offset (from the beginning of the source Tvb) of a sub Tvb. */
Tvb tvb = checkTvb(L,1);
if (!tvb) return 0;
@@ -475,21 +475,21 @@ WSLUA_METHOD Tvb_offset(lua_State* L) {
}
lua_pushnumber(L,TVB_RAW_OFFSET(tvb->ws_tvb));
- WSLUA_RETURN(1); /* the raw offset of the Tvb. */
+ WSLUA_RETURN(1); /* The raw offset of the Tvb. */
}
#if USED_FOR_DOC_PURPOSES
WSLUA_METAMETHOD Tvb__call(lua_State* L) {
- /* equivalent to tvb:range(...) */
+ /* Equivalent to tvb:range(...) */
return 0;
}
#endif
WSLUA_CLASS_DEFINE(TvbRange,FAIL_ON_NULL("expired tvbrange"),NOP);
/*
- * a TvbRange represents an usable range of a Tvb and is used to extract data from the Tvb that generated it
- * TvbRanges are created by calling a tvb (e.g. tvb(offset,length)). If the TvbRange span is outside the Tvb's range the creation will cause a runtime error.
+ A TvbRange represents an usable range of a Tvb and is used to extract data from the Tvb that generated it
+ TvbRanges are created by calling a tvb (e.g. tvb(offset,length)). If the TvbRange span is outside the Tvb's range the creation will cause a runtime error.
*/
TvbRange new_TvbRange(lua_State* L, tvbuff_t* ws_tvb, int offset, int len) {
@@ -524,7 +524,7 @@ TvbRange new_TvbRange(lua_State* L, tvbuff_t* ws_tvb, int offset, int len) {
WSLUA_METHOD Tvb_range(lua_State* L) {
- /* creates a tvbr from this Tvb. This is used also as the Tvb:__call() metamethod. */
+ /* Creates a tvbr from this Tvb. This is used also as the Tvb:__call() metamethod. */
#define WSLUA_OPTARG_Tvb_range_OFFSET 2 /* The offset (in octets) from the begining of the Tvb. Defaults to 0. */
#define WSLUA_OPTARG_Tvb_range_LENGTH 3 /* The length (in octets) of the range. Defaults to until the end of the Tvb. */
@@ -541,7 +541,7 @@ WSLUA_METHOD Tvb_range(lua_State* L) {
if ((tvbr = new_TvbRange(L,tvb->ws_tvb,offset,len))) {
PUSH_TVBRANGE(L,tvbr);
- WSLUA_RETURN(1); /* the TvbRange */
+ WSLUA_RETURN(1); /* The TvbRange */
}
return 0;
@@ -573,7 +573,7 @@ int Tvb_register(lua_State* L) {
* get a Blefuscuoan unsigned integer from a tvb
*/
WSLUA_METHOD TvbRange_uint(lua_State* L) {
- /* get a Big Endian (network order) unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long. */
+ /* Get a Big Endian (network order) unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
if (tvbr->tvb->expired) {
@@ -593,7 +593,7 @@ WSLUA_METHOD TvbRange_uint(lua_State* L) {
return 1;
case 4:
lua_pushnumber(L,tvb_get_ntohl(tvbr->tvb->ws_tvb,tvbr->offset));
- WSLUA_RETURN(1); /* the unsigned integer value */
+ WSLUA_RETURN(1); /* The unsigned integer value */
/*
* XXX:
* lua uses double so we have 52 bits to play with
@@ -611,7 +611,7 @@ WSLUA_METHOD TvbRange_uint(lua_State* L) {
* get a Lilliputian unsigned integer from a tvb
*/
WSLUA_METHOD TvbRange_le_uint(lua_State* L) {
- /* get a Little Endian unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long. */
+ /* Get a Little Endian unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
if (tvbr->tvb->expired) {
@@ -632,7 +632,7 @@ WSLUA_METHOD TvbRange_le_uint(lua_State* L) {
return 1;
case 4:
lua_pushnumber(L,tvb_get_letohl(tvbr->tvb->ws_tvb,tvbr->offset));
- WSLUA_RETURN(1); /* the unsigned integer value */
+ WSLUA_RETURN(1); /* The unsigned integer value */
default:
luaL_error(L,"TvbRange:get_le_uint() does not handle %d byte integers",tvbr->len);
return 0;
@@ -643,7 +643,7 @@ WSLUA_METHOD TvbRange_le_uint(lua_State* L) {
* get a Blefuscuoan unsigned 64 bit integer from a tvb
*/
WSLUA_METHOD TvbRange_uint64(lua_State* L) {
- /* get a Big Endian (network order) unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long. */
+ /* Get a Big Endian (network order) unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
if (tvbr->tvb->expired) {
@@ -675,7 +675,7 @@ WSLUA_METHOD TvbRange_uint64(lua_State* L) {
* get a Lilliputian unsigned 64 bit integer from a tvb
*/
WSLUA_METHOD TvbRange_le_uint64(lua_State* L) {
- /* get a Little Endian unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long. */
+ /* Get a Little Endian unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
if (tvbr->tvb->expired) {
@@ -707,7 +707,7 @@ WSLUA_METHOD TvbRange_le_uint64(lua_State* L) {
* get a Blefuscuoan float
*/
WSLUA_METHOD TvbRange_float(lua_State* L) {
- /* get a Big Endian (network order) floating point number from a TvbRange. The range must be 4 or 8 octets long. */
+ /* Get a Big Endian (network order) floating point number from a TvbRange. The range must be 4 or 8 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
if (tvbr->tvb->expired) {
@@ -721,7 +721,7 @@ WSLUA_METHOD TvbRange_float(lua_State* L) {
return 1;
case 8:
lua_pushnumber(L,tvb_get_ntohieee_double(tvbr->tvb->ws_tvb,tvbr->offset));
- WSLUA_RETURN(1); /* the flaoting point value */
+ WSLUA_RETURN(1); /* The flaoting point value */
default:
luaL_error(L,"TvbRange:get_float() does not handle %d byte floating numbers",tvbr->len);
return 0;
@@ -732,7 +732,7 @@ WSLUA_METHOD TvbRange_float(lua_State* L) {
* get a Lilliputian float
*/
WSLUA_METHOD TvbRange_le_float(lua_State* L) {
- /* get a Little Endian floating point number from a TvbRange. The range must be 4 or 8 octets long. */
+ /* Get a Little Endian floating point number from a TvbRange. The range must be 4 or 8 octets long. */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
@@ -742,7 +742,7 @@ WSLUA_METHOD TvbRange_le_float(lua_State* L) {
return 1;
case 8:
lua_pushnumber(L,tvb_get_letohieee_double(tvbr->tvb->ws_tvb,tvbr->offset));
- WSLUA_RETURN(1); /* the flaoting point value */
+ WSLUA_RETURN(1); /* The flaoting point value */
default:
luaL_error(L,"TvbRange:get_float() does not handle %d byte floating numbers",tvbr->len);
return 0;
@@ -750,7 +750,7 @@ WSLUA_METHOD TvbRange_le_float(lua_State* L) {
}
WSLUA_METHOD TvbRange_ipv4(lua_State* L) {
- /* get an IPv4 Address from a TvbRange. */
+ /* Get an IPv4 Address from a TvbRange. */
TvbRange tvbr = checkTvbRange(L,1);
Address addr;
@@ -773,11 +773,11 @@ WSLUA_METHOD TvbRange_ipv4(lua_State* L) {
SET_ADDRESS(addr, AT_IPv4, 4, ip_addr);
pushAddress(L,addr);
- WSLUA_RETURN(1); /* the IPv4 Address */
+ WSLUA_RETURN(1); /* The IPv4 Address */
}
WSLUA_METHOD TvbRange_le_ipv4(lua_State* L) {
- /* get an Little Endian IPv4 Address from a TvbRange. */
+ /* Get an Little Endian IPv4 Address from a TvbRange. */
TvbRange tvbr = checkTvbRange(L,1);
Address addr;
@@ -801,11 +801,11 @@ WSLUA_METHOD TvbRange_le_ipv4(lua_State* L) {
SET_ADDRESS(addr, AT_IPv4, 4, ip_addr);
pushAddress(L,addr);
- WSLUA_RETURN(1); /* the IPv4 Address */
+ WSLUA_RETURN(1); /* The IPv4 Address */
}
WSLUA_METHOD TvbRange_ether(lua_State* L) {
- /* get an Ethernet Address from a TvbRange. */
+ /* Get an Ethernet Address from a TvbRange. */
TvbRange tvbr = checkTvbRange(L,1);
Address addr;
guint8* buff;
@@ -826,12 +826,12 @@ WSLUA_METHOD TvbRange_ether(lua_State* L) {
SET_ADDRESS(addr, AT_ETHER, 6, buff);
pushAddress(L,addr);
- WSLUA_RETURN(1); /* the Ethernet Address */
+ WSLUA_RETURN(1); /* The Ethernet Address */
}
WSLUA_METHOD TvbRange_string(lua_State* L) {
- /* obtain a string from a TvbRange */
+ /* Obtain a string from a TvbRange */
TvbRange tvbr = checkTvbRange(L,1);
if ( !(tvbr && tvbr->tvb)) return 0;
@@ -842,11 +842,11 @@ WSLUA_METHOD TvbRange_string(lua_State* L) {
lua_pushstring(L, (gchar*)tvb_get_ephemeral_string(tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len) );
- WSLUA_RETURN(1); /* the string */
+ WSLUA_RETURN(1); /* The string */
}
WSLUA_METHOD TvbRange_bytes(lua_State* L) {
- /* obtain a ByteArray */
+ /* Obtain a ByteArray */
TvbRange tvbr = checkTvbRange(L,1);
GByteArray* ba;
@@ -861,11 +861,11 @@ WSLUA_METHOD TvbRange_bytes(lua_State* L) {
pushByteArray(L,ba);
- WSLUA_RETURN(1); /* the ByteArray */
+ WSLUA_RETURN(1); /* The ByteArray */
}
WSLUA_METHOD TvbRange_len(lua_State* L) {
- /* obtain the length of a TvbRange */
+ /* Obtain the length of a TvbRange */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
@@ -878,7 +878,7 @@ WSLUA_METHOD TvbRange_len(lua_State* L) {
}
WSLUA_METHOD TvbRange_offset(lua_State* L) {
- /* obtain the offset in a TvbRange */
+ /* Obtain the offset in a TvbRange */
TvbRange tvbr = checkTvbRange(L,1);
if (!(tvbr && tvbr->tvb)) return 0;
@@ -892,7 +892,7 @@ WSLUA_METHOD TvbRange_offset(lua_State* L) {
WSLUA_METAMETHOD TvbRange__tostring(lua_State* L) {
- /* converts the TvbRange into a string. As the string gets truncated
+ /* Converts the TvbRange into a string. As the string gets truncated
you should use this only for debugging purposes
or if what you want is to have a truncated string in the format 67:89:AB:... */
TvbRange tvbr = checkTvbRange(L,1);
@@ -939,15 +939,15 @@ int TvbRange_register(lua_State* L) {
WSLUA_CLASS_DEFINE(Int64,NOP,NOP);
/*
- * Int64 represents a 64 bit integer.
- * Lua uses one single number representation which can be chosen at compile time and since
- * it is often set to IEEE 754 double precision floating point, we cannot store a 64 bit integer
- * with full precision.
- * For details, see: http://lua-users.org/wiki/FloatingPoint
+ Int64 represents a 64 bit integer.
+ Lua uses one single number representation which can be chosen at compile time and since
+ it is often set to IEEE 754 double precision floating point, we cannot store a 64 bit integer
+ with full precision.
+ For details, see: http://lua-users.org/wiki/FloatingPoint
*/
WSLUA_METAMETHOD Int64__tostring(lua_State* L) {
- /* converts the Int64 into a string */
+ /* Converts the Int64 into a string */
Int64 num = checkInt64(L,1);
lua_pushstring(L,g_strdup_printf("%ld",(long int)*(num)));
return 1;
@@ -968,12 +968,10 @@ int Int64_register(lua_State* L) {
}
WSLUA_CLASS_DEFINE(UInt64,NOP,NOP);
-/*
- * Int64 represents a 64 bit integer.
- */
+ /* Int64 represents a 64 bit integer. */
WSLUA_METAMETHOD UInt64__tostring(lua_State* L) {
- /* converts the UInt64 into a string */
+ /* Converts the UInt64 into a string */
UInt64 num = checkUInt64(L,1);
lua_pushstring(L,g_strdup_printf("%ld",(unsigned long int)*(num)));
return 1;