aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-05-20 11:57:53 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-05-20 11:57:53 +0200
commit9b24577be41e2933bcb0bace0be85374dbf216c5 (patch)
treea43b83fb0560c5871ac976468d053d739af737db /src
parent0ec260c12ee6a37e763bc60ef587dbd891136e76 (diff)
downloadlanes-9b24577be41e2933bcb0bace0be85374dbf216c5.tar.gz
lanes-9b24577be41e2933bcb0bace0be85374dbf216c5.tar.bz2
lanes-9b24577be41e2933bcb0bace0be85374dbf216c5.zip
Restore linda:limit(0), it was a mistake
Diffstat (limited to 'src')
-rw-r--r--src/linda.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index 4086211..8ec167d 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -486,7 +486,7 @@ LUAG_FUNC(linda_receive)
486/* 486/*
487 * [true|lanes.cancel_error] = linda_set( linda_ud, key_num|str|bool|lightuserdata [, value [, ...]]) 487 * [true|lanes.cancel_error] = linda_set( linda_ud, key_num|str|bool|lightuserdata [, value [, ...]])
488 * 488 *
489 * Set one or more value to Linda. 489 * Set one or more value to Linda. Ignores limits.
490 * 490 *
491 * Existing slot value is replaced, and possible queued entries removed. 491 * Existing slot value is replaced, and possible queued entries removed.
492 */ 492 */
@@ -594,6 +594,7 @@ LUAG_FUNC(linda_get)
594 * 594 *
595 * Set limit to 1 Linda keys. 595 * Set limit to 1 Linda keys.
596 * Optionally wake threads waiting to write on the linda, in case the limit enables them to do so 596 * Optionally wake threads waiting to write on the linda, in case the limit enables them to do so
597 * Limit can be 0 to completely block everything
597 */ 598 */
598LUAG_FUNC(linda_limit) 599LUAG_FUNC(linda_limit)
599{ 600{
@@ -604,7 +605,7 @@ LUAG_FUNC(linda_limit)
604 // make sure we got a numeric limit 605 // make sure we got a numeric limit
605 lua_Number const _limit{ luaL_checknumber(L_, 3) }; 606 lua_Number const _limit{ luaL_checknumber(L_, 3) };
606 if (_limit < 1) { 607 if (_limit < 1) {
607 raise_luaL_argerror(L_, 3, "limit must be >= 1"); 608 raise_luaL_argerror(L_, 3, "limit must be >= 0");
608 } 609 }
609 // make sure the key is of a valid type 610 // make sure the key is of a valid type
610 check_key_types(L_, 2, 2); 611 check_key_types(L_, 2, 2);