Skip to content

Commit 78be6f0

Browse files
committed
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.
1 parent 714a6a0 commit 78be6f0

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/main/java/com/laytonsmith/core/functions/ByteArrays.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
161161

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

594594
@Override

0 commit comments

Comments
 (0)