@@ -330,7 +330,7 @@ test "type of and getting values" {
330
330
try expect (lua .isFunction (-1 ));
331
331
try expectEqual (ziglua .wrap (add ), try lua .toCFunction (-1 ));
332
332
333
- _ = lua .pushBytes ("hello world" );
333
+ _ = lua .pushString ("hello world" );
334
334
try expectEqual (.string , lua .typeOf (-1 ));
335
335
try expect (lua .isString (-1 ));
336
336
@@ -373,7 +373,7 @@ test "unsigned" {
373
373
lua .pushUnsigned (123456 );
374
374
try expectEqual (123456 , try lua .toUnsigned (-1 ));
375
375
376
- _ = lua .pushBytes ("hello" );
376
+ _ = lua .pushString ("hello" );
377
377
try expectError (error .Fail , lua .toUnsigned (-1 ));
378
378
}
379
379
@@ -1365,7 +1365,7 @@ test "aux check functions" {
1365
1365
lua .pushFunction (function );
1366
1366
lua .pushNil ();
1367
1367
lua .pushInteger (3 );
1368
- _ = lua .pushBytes ("hello world" );
1368
+ _ = lua .pushString ("hello world" );
1369
1369
lua .protectedCall (3 , 0 , 0 ) catch {
1370
1370
try expectStringContains ("number expected" , try lua .toBytes (-1 ));
1371
1371
lua .pop (-1 );
@@ -1374,7 +1374,7 @@ test "aux check functions" {
1374
1374
lua .pushFunction (function );
1375
1375
lua .pushNil ();
1376
1376
lua .pushInteger (3 );
1377
- _ = lua .pushBytes ("hello world" );
1377
+ _ = lua .pushString ("hello world" );
1378
1378
lua .pushNumber (4 );
1379
1379
lua .protectedCall (4 , 0 , 0 ) catch {
1380
1380
try expectStringContains ("string expected" , try lua .toBytes (-1 ));
@@ -1384,7 +1384,7 @@ test "aux check functions" {
1384
1384
lua .pushFunction (function );
1385
1385
lua .pushNil ();
1386
1386
lua .pushInteger (3 );
1387
- _ = lua .pushBytes ("hello world" );
1387
+ _ = lua .pushString ("hello world" );
1388
1388
lua .pushNumber (4 );
1389
1389
_ = lua .pushStringZ ("hello world" );
1390
1390
lua .protectedCall (5 , 0 , 0 ) catch {
@@ -1396,7 +1396,7 @@ test "aux check functions" {
1396
1396
lua .pushFunction (function );
1397
1397
lua .pushNil ();
1398
1398
lua .pushInteger (3 );
1399
- _ = lua .pushBytes ("hello world" );
1399
+ _ = lua .pushString ("hello world" );
1400
1400
lua .pushNumber (4 );
1401
1401
_ = lua .pushStringZ ("hello world" );
1402
1402
lua .pushBoolean (true );
@@ -1410,7 +1410,7 @@ test "aux check functions" {
1410
1410
// test pushFail here (currently acts the same as pushNil)
1411
1411
if (ziglua .lang == .lua54 ) lua .pushFail () else lua .pushNil ();
1412
1412
lua .pushInteger (3 );
1413
- _ = lua .pushBytes ("hello world" );
1413
+ _ = lua .pushString ("hello world" );
1414
1414
lua .pushNumber (4 );
1415
1415
_ = lua .pushStringZ ("hello world" );
1416
1416
lua .pushBoolean (true );
@@ -1439,7 +1439,7 @@ test "aux opt functions" {
1439
1439
1440
1440
lua .pushFunction (function );
1441
1441
lua .pushInteger (10 );
1442
- _ = lua .pushBytes ("zig" );
1442
+ _ = lua .pushString ("zig" );
1443
1443
lua .pushNumber (1.23 );
1444
1444
_ = lua .pushStringZ ("lang" );
1445
1445
try lua .protectedCall (4 , 0 , 0 );
@@ -1565,7 +1565,7 @@ test "ref" {
1565
1565
try expectError (error .Fail , lua .ref (ziglua .registry_index ));
1566
1566
try expectEqual (0 , lua .getTop ());
1567
1567
1568
- _ = lua .pushBytes ("Hello there" );
1568
+ _ = lua .pushString ("Hello there" );
1569
1569
const ref = try lua .ref (ziglua .registry_index );
1570
1570
1571
1571
_ = lua .rawGetIndex (ziglua .registry_index , ref );
@@ -1586,7 +1586,7 @@ test "ref luau" {
1586
1586
1587
1587
// In luau lua.ref does not pop the item from the stack
1588
1588
// and the data is stored in the registry_index by default
1589
- lua .pushBytes ("Hello there" );
1589
+ lua .pushString ("Hello there" );
1590
1590
const ref = try lua .ref (2 );
1591
1591
1592
1592
_ = lua .rawGetIndex (ziglua .registry_index , ref );
@@ -1718,11 +1718,11 @@ test "userdata" {
1718
1718
fn inner (l : * Lua ) i32 {
1719
1719
const ptr = l .checkUserdata (Type , 1 , "Type" );
1720
1720
if (ptr .a != 1234 ) {
1721
- _ = l .pushBytes ("error!" );
1721
+ _ = l .pushString ("error!" );
1722
1722
l .raiseError ();
1723
1723
}
1724
1724
if (ptr .b != 3.14 ) {
1725
- _ = l .pushBytes ("error!" );
1725
+ _ = l .pushString ("error!" );
1726
1726
l .raiseError ();
1727
1727
}
1728
1728
return 1 ;
@@ -1751,15 +1751,15 @@ test "userdata" {
1751
1751
const testUdata = ziglua .wrap (struct {
1752
1752
fn inner (l : * Lua ) i32 {
1753
1753
const ptr = l .testUserdata (Type , 1 , "Type" ) catch {
1754
- _ = l .pushBytes ("error!" );
1754
+ _ = l .pushString ("error!" );
1755
1755
l .raiseError ();
1756
1756
};
1757
1757
if (ptr .a != 1234 ) {
1758
- _ = l .pushBytes ("error!" );
1758
+ _ = l .pushString ("error!" );
1759
1759
l .raiseError ();
1760
1760
}
1761
1761
if (ptr .b != 3.14 ) {
1762
- _ = l .pushBytes ("error!" );
1762
+ _ = l .pushString ("error!" );
1763
1763
l .raiseError ();
1764
1764
}
1765
1765
return 0 ;
0 commit comments