mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 21:40:16 +00:00
...
This commit is contained in:
parent
20b11c17cf
commit
3aaa3dcb6d
@ -52,15 +52,15 @@ Only basic types can be passed between python and lua.
|
|||||||
The following table shows the type mapping.
|
The following table shows the type mapping.
|
||||||
If you pass an unsupported type, an exception will be raised.
|
If you pass an unsupported type, an exception will be raised.
|
||||||
|
|
||||||
| Python Type | Lua Type |
|
| Python type | Lua type | Allow create in Python? |
|
||||||
| ----------- | -------- |
|
| ----------- | -------- | ---------------------- |
|
||||||
| None | nil |
|
| `None` | `nil` | YES |
|
||||||
| bool | boolean |
|
| `bool` | `boolean` | YES |
|
||||||
| int | number |
|
| `int` | `number` | YES |
|
||||||
| float | number |
|
| `float` | `number` | YES |
|
||||||
| str | string |
|
| `str` | `string` | YES |
|
||||||
| lua.Table | table |
|
| `lua.Table` | `table` | YES |
|
||||||
| lua.Function| function |
|
| `lua.Function`| `function`| NO |
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```cpp
|
```cpp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user