Skip to content
Permalink
Browse files
Document ba_put and ba_get signedness
Update documentation to include that `ba_put_X` and `ba_get_X` for bytes, shorts, integers and longs uses signed values.
  • Loading branch information
Pieter12345 committed Jan 8, 2021
1 parent 714a6a0 commit 78be6f0
Showing 1 changed file with 16 additions and 16 deletions.
@@ -161,8 +161,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "int {byte_array, [pos]} Returns an int, read in as an 8 bit byte, from the given position, or wherever the"
+ " marker is currently at by default.";
return "int {byte_array, [pos]} Returns an int, read in as an 8 bit signed byte, from the given position,"
+ " or wherever the marker is currently at by default.";
}

@Override
@@ -225,8 +225,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "int {byte_array, [pos]} Returns an int, read in as a 16 bit short, from the given position, or wherever the"
+ " marker is currently at by default.";
return "int {byte_array, [pos]} Returns an int, read in as a 16 bit signed short,"
+ " from the given position, or wherever the marker is currently at by default.";
}

@Override
@@ -256,8 +256,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "int {byte_array, [pos]} Returns an int, read in as a 32 bit int, from the given position, or wherever the"
+ " marker is currently at by default.";
return "int {byte_array, [pos]} Returns an int, read in as a 32 bit signed int, from the given position,"
+ " or wherever the marker is currently at by default.";
}

@Override
@@ -288,8 +288,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "int {byte_array, [pos]} Returns an int, read in as a 64 bit long, from the given position, or wherever the"
+ " marker is currently at by default.";
return "int {byte_array, [pos]} Returns an int, read in as a 64 bit signed long, from the given position,"
+ " or wherever the marker is currently at by default.";
}

@Override
@@ -464,8 +464,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "void {byte_array, int, [pos]} Writes an int, interpreted as an 8 bit byte, starting from the given position, or wherever the"
+ " marker is currently at by default.";
return "void {byte_array, int, [pos]} Writes an int, interpreted as an 8 bit signed byte,"
+ " starting from the given position, or wherever the marker is currently at by default.";
}

@Override
@@ -528,8 +528,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "void {byte_array, int, [pos]} Writes an int, interpreted as an 16 bit short, starting from the given position, or wherever the"
+ " marker is currently at by default.";
return "void {byte_array, int, [pos]} Writes an int, interpreted as an 16 bit signed short,"
+ " starting from the given position, or wherever the marker is currently at by default.";
}

@Override
@@ -558,8 +558,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "void {byte_array, int, [pos]} Writes an int, interpreted as a 32 bit int, starting from the given position, or wherever the"
+ " marker is currently at by default.";
return "void {byte_array, int, [pos]} Writes an int, interpreted as a 32 bit signed int,"
+ " starting from the given position, or wherever the marker is currently at by default.";
}

@Override
@@ -587,8 +587,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi

@Override
public String docs() {
return "void {byte_array, int, [pos]} Writes an int, interpreted as a 64 bit, starting from the given position, or wherever the"
+ " marker is currently at by default.";
return "void {byte_array, int, [pos]} Writes an int, interpreted as a 64 bit signed long,"
+ " starting from the given position, or wherever the marker is currently at by default.";
}

@Override

0 comments on commit 78be6f0

Please sign in to comment.