mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Modified the Lua API timeout argument specification to be an extension of the v3.9 specification
Fix the v3.9-incompatible changes in 8e02cde ("Lua API Timeout
Specification Changes to Enable Non-Blocking Reads", November 15, 2025)
to make them compatible.
The timeout arguments for tio.expect/s(), tio.read(), and tio.readline()
have been changed as follows:
- The timeout is in milliseconds, and the default is 0, which means to
wait forever (as in v3.9).
- A negative value means to nowait.
A constant table (tio.C) has also been added,
defining tio.C.FOREVER to 0 and tio.C.NOWAIT to -1.
This commit is contained in:
parent
0da8731c0b
commit
c009ed755c
3 changed files with 33 additions and 11 deletions
|
|
@ -24,7 +24,8 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define WRITE_POLL_FOREVER (-1)
|
||||
#define POLL_NOWAIT (0)
|
||||
#define POLL_FOREVER (-1)
|
||||
#define UNUSED(expr) do { (void)(expr); } while (0)
|
||||
|
||||
void delay(long ms);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue