From 9cd1ed164b18414df35315d13b94811b77e62da0 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 14 Oct 2023 01:38:54 +0800 Subject: [PATCH] some doc fix --- docs/bindings.md | 17 +++++++++-------- docs/retype.yml | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/bindings.md b/docs/bindings.md index 98ad9742..4b5d2b15 100644 --- a/docs/bindings.md +++ b/docs/bindings.md @@ -6,13 +6,6 @@ order: 18 In order to use a C/C++ library in python, you need to write bindings for it. -## Automatic bindings - -pkpy supports automatic binding generation **only for C libraries**. -See [pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) for details. - -It takes a C header file and generates a python module stub (`*.pyi`) and a C++ binding file (`*.cpp`). - ## Manual bindings pkpy uses an universal signature to wrap a function pointer as a python function or method that can be called in python code, i.e `NativeFuncC`. @@ -258,6 +251,14 @@ This specialized binding function has optimizations and result in better perform For example, `vm->bind__add__` is preferred over `vm->bind_method<1>(type, "__add__", ...)`. -### Further reading +## Automatic bindings + +pkpy supports automatic binding generation **only for C libraries**. +See [pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) for details. + +It takes a C header file and generates a python module stub (`*.pyi`) and a C++ binding file (`*.cpp`). + + +## Further reading See [random.cpp](https://github.com/blueloveTH/pocketpy/blob/main/src/random.cpp) for an example used by `random` module. \ No newline at end of file diff --git a/docs/retype.yml b/docs/retype.yml index bea48c13..bff62afd 100644 --- a/docs/retype.yml +++ b/docs/retype.yml @@ -3,7 +3,7 @@ output: .retype url: https://pocketpy.dev branding: title: pocketpy - label: v1.2.4 + label: v1.2.6 logo: "./static/logo.png" favicon: "./static/logo.png" meta: