diff options
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 (_, ...) |
