pyclibrary icon indicating copy to clipboard operation
pyclibrary copied to clipboard

Permit module reuse, remove init function

Open kalvdans opened this issue 2 years ago • 2 comments

We have many Python modules that makes use of pyclibrary. Only one is allowed to call pyclibrary.init(). This issue is about removing the init() method and instead move its parameters to each CParser instance, to allow several uses of pyclibrary in one Python interpreter.

kalvdans avatar Oct 26 '23 12:10 kalvdans

Thanks for reaching out.

My bandwidth for this project is extremely limited. If you can make a PR I will review it under the best delay but I won't have time to at this myself.

MatthieuDartiailh avatar Oct 26 '23 16:10 MatthieuDartiailh

I took a sunday afternoon to try to come up with a PR but got stuck in how nestled the global variables are. Even class Type is not the same in two configurations. The cache will incorrectly be reused in a different init configuration. The metaclass used for pluggable backends is hindering... I would probably make a PR to revert pluggable backends first.

kalvdans avatar Nov 12 '23 21:11 kalvdans