mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-23 04:50:17 +00:00
Update common.h
This commit is contained in:
parent
8203ef465e
commit
7bfe8d4bbf
@ -103,6 +103,7 @@ struct Type {
|
|||||||
bool operator==(Type other) const { return this->index == other.index; }
|
bool operator==(Type other) const { return this->index == other.index; }
|
||||||
bool operator!=(Type other) const { return this->index != other.index; }
|
bool operator!=(Type other) const { return this->index != other.index; }
|
||||||
constexpr operator int() const { return index; }
|
constexpr operator int() const { return index; }
|
||||||
|
constexpr operator bool() const { return index != 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PK_LAMBDA(x) ([](VM* vm, ArgsView args) { return x; })
|
#define PK_LAMBDA(x) ([](VM* vm, ArgsView args) { return x; })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user