diff options
| author | Kenny <3454741+WarriorOfWire@users.noreply.github.com> | 2020-07-21 00:01:22 -0700 |
|---|---|---|
| committer | Kenny <3454741+WarriorOfWire@users.noreply.github.com> | 2020-07-23 20:40:16 -0700 |
| commit | 51a79b1af7fa663bb078136611705c04df12970a (patch) | |
| tree | 69e15aa9c69c8383885ff899d67b584e2a060935 /py/runtime0.h | |
| parent | 543708416bc19bc1e77d859d013c4757433ad255 (diff) | |
add coroutine behavior for generators
coroutines don't have __next__; they also call themselves coroutines.
This does not change the fact that `async def` methods are generators,
but it does make them behave more like CPython.
Diffstat (limited to 'py/runtime0.h')
| -rw-r--r-- | py/runtime0.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime0.h b/py/runtime0.h index a8089ea64..fb35c8a9f 100644 --- a/py/runtime0.h +++ b/py/runtime0.h @@ -33,6 +33,7 @@ #define MP_SCOPE_FLAG_VARKEYWORDS (0x02) #define MP_SCOPE_FLAG_GENERATOR (0x04) #define MP_SCOPE_FLAG_DEFKWARGS (0x08) +#define MP_SCOPE_FLAG_ASYNC (0x10) // types for native (viper) function signature #define MP_NATIVE_TYPE_OBJ (0x00) |
