Skip to content

Commit

Permalink
Update overview.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroIntensity authored Apr 30, 2024
1 parent 58b89e4 commit 9265d56
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ typedef struct _AwaitableObject AwaitableObject;
!!! info "Calling Conventions"
The PyAwaitable DLL doesn't ship with exported function names, but instead loads an array of function pointers (this is done by `awaitable_init`). For example, `awaitable_new` defined from the headers isn't actually the `awaitable_new` definition, but instead is:
```c
#define awaitable_new ((_awaitable_new_type) awaitable_api[2])
```
This means that you *cannot* use PyAwaitable's functions from an FFI or something similar. While this isn't the greatest way of doing things, it's Python convention. For information why this is the behavior, see [this discussion](https://discuss.python.org/t/linking-against-installed-extension-modules/51710).
PyAwaitable distributes it's functions via [capsules](https://docs.python.org/3/extending/extending.html#using-capsules). For information why this is the behavior, see [this discussion](https://discuss.python.org/t/linking-against-installed-extension-modules/51710).
## Lifecycle
Expand Down

0 comments on commit 9265d56

Please sign in to comment.