我想创建简单的extension module。 我创建Main.groovy文件 class Item {
String item
}
new Item().sayHello() // this method supposed to be extension
我编译它(不跑)。 我创建ItemExtension.groovy类 class ItemExtension {
这个问题是关于如何从扩展模块(即用C语言编写的)中检测用于执行扩展模块的Python解释器的版本。 作为背景,在Python扩展模块内部可以直接获取编译扩展的Python版本。在包含标准Python头文件Python.h(例如,宏PY_VERSION)时,您可以使用macros defined in patchlevel.h之一。 我的问题是,是否可以从扩展模块中获取运行时版本的当前用于运行扩展的