File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3492,7 +3492,7 @@ pub const Buffer = struct {
3492
3492
3493
3493
/// Adds the string to the buffer
3494
3494
/// See https://www.lua.org/manual/5.4/manual.html#luaL_addlstring
3495
- pub fn addBytes (buf : * Buffer , str : []const u8 ) void {
3495
+ pub fn addString (buf : * Buffer , str : []const u8 ) void {
3496
3496
c .luaL_addlstring (& buf .b , str .ptr , str .len );
3497
3497
}
3498
3498
@@ -3511,7 +3511,7 @@ pub const Buffer = struct {
3511
3511
3512
3512
/// Adds the zero-terminated string pointed to by `str` to the buffer
3513
3513
/// See https://www.lua.org/manual/5.4/manual.html#luaL_addstring
3514
- pub fn addString (buf : * Buffer , str : [:0 ]const u8 ) void {
3514
+ pub fn addStringZ (buf : * Buffer , str : [:0 ]const u8 ) void {
3515
3515
switch (lang ) {
3516
3516
.luau = > c .luaL_addlstring (& buf .b , str .ptr , str .len ),
3517
3517
else = > c .luaL_addstring (& buf .b , str .ptr ),
Original file line number Diff line number Diff line change @@ -553,14 +553,14 @@ test "string buffers" {
553
553
buffer .init (lua );
554
554
555
555
buffer .addChar ('z' );
556
- buffer .addString ("igl" );
556
+ buffer .addStringZ ("igl" );
557
557
558
558
var str = buffer .prep ();
559
559
str [0 ] = 'u' ;
560
560
str [1 ] = 'a' ;
561
561
buffer .addSize (2 );
562
562
563
- buffer .addBytes (" api " );
563
+ buffer .addString (" api " );
564
564
lua .pushNumber (5.1 );
565
565
buffer .addValue ();
566
566
buffer .pushResult ();
You can’t perform that action at this time.
0 commit comments