diff options
| author | ruki <[email protected]> | 2022-04-06 00:54:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-06 00:54:38 +0800 |
| commit | adb0d9cf10af42d491371fbf2504d9de8af159fd (patch) | |
| tree | c349b60a05e17b201cec53a076aef1c886e3199c /xmake/core/base/bytes.lua | |
| parent | 913dd698032feb120b1c98d116aab3a89782be3d (diff) | |
add stream stub
Diffstat (limited to 'xmake/core/base/bytes.lua')
| -rw-r--r-- | xmake/core/base/bytes.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/base/bytes.lua b/xmake/core/base/bytes.lua index bb65d0cfc..199d071f0 100644 --- a/xmake/core/base/bytes.lua +++ b/xmake/core/base/bytes.lua @@ -461,6 +461,14 @@ function bytes.new(...) return _instance.new(...) end +-- is instance of bytes? +function bytes.instance_of(data) + if type(data) == "table" and data.cdata and data.size then + return true + end + return false +end + -- register call function setmetatable(bytes, { __call = function (_, ...) |
