Skip to content

Commit

Permalink
Update overview.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroIntensity authored May 1, 2024
1 parent fbba370 commit 389e3bd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Overview

## Initialization

After installing PyAwaitable, you need to initialize the ABI. This is done with `awaitable_init`.

!!! tip

You can check if the ABI is initialized via a `NULL` check on `awaitable_abi`

```c
assert(awaitable_abi != NULL);
```

Note that the ABI is initialized *per file*, so you need to call `awaitable_init` at least once per file. For example, this can be done in a module initialization function:

```c
PyMODINIT_FUNC PyInit_yourextension() {
if (awaitable_init() < 0)
return NULL;
// ...
}
```

## API

!!! note
Expand Down

0 comments on commit 389e3bd

Please sign in to comment.