本文整理汇总了Python中rpython.translator.c.genc.CStandaloneBuilder.modulename方法的典型用法代码示例。如果您正苦于以下问题:Python CStandaloneBuilder.modulename方法的具体用法?Python CStandaloneBuilder.modulename怎么用?Python CStandaloneBuilder.modulename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rpython.translator.c.genc.CStandaloneBuilder
的用法示例。
在下文中一共展示了CStandaloneBuilder.modulename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: task_database_c
# 需要导入模块: from rpython.translator.c.genc import CStandaloneBuilder [as 别名]
# 或者: from rpython.translator.c.genc.CStandaloneBuilder import modulename [as 别名]
def task_database_c(self):
""" Create a database for further backend generation
"""
translator = self.translator
if translator.annotator is not None:
translator.frozen = True
standalone = self.standalone
if standalone:
from rpython.translator.c.genc import CStandaloneBuilder
cbuilder = CStandaloneBuilder(self.translator, self.entry_point,
config=self.config,
secondary_entrypoints=self.secondary_entrypoints)
else:
from rpython.translator.c.dlltool import CLibraryBuilder
functions = [(self.entry_point, None)] + self.secondary_entrypoints
cbuilder = CLibraryBuilder(self.translator, self.entry_point,
functions=functions,
name='libtesting',
config=self.config)
if not standalone: # xxx more messy
cbuilder.modulename = self.extmod_name
database = cbuilder.build_database()
self.log.info("database for generating C source was created")
self.cbuilder = cbuilder
self.database = database