pocketpy / pocketpy

Portable Python 3.x Interpreter in Modern C
https://pocketpy.dev/
MIT License
1.6k stars 112 forks source link

[v2.0-c11] move core implementation to C11 #265

Closed blueloveTH closed 3 months ago

blueloveTH commented 4 months ago

Description

  1. Redesign the core architecture and move them to C11
  2. Let C++ classes wraps new C11 APIs

Headers

Sources

blueloveTH commented 4 months ago

Coding Style Tips

blueloveTH commented 4 months ago

TODO:

  1. rename ::PyVar to pkpy_Value
  2. rename ::PyObject
nathanpage-credo commented 3 months ago

It looks like you have dropped support for multiple VMs in v2 and instead use pk_current_vm. Is that a feature that will come back?

blueloveTH commented 3 months ago

It looks like you have dropped support for multiple VMs in v2 and instead use pk_current_vm. Is that a feature that will come back?

Paritially. v2 still supports multi-vm. You can keep multi-vm states but only one of them can be active. And all operations are based on the current active vm. We will introduce a API like py_switch_vm which allows you to switch between VMs.