|
PCART
v1.4
Automated Repair of Python API Parameter Compatibility Issues
|
Provide utility functions for loading and processing lib APIs. More...
Functions | |
| def | func (libApiObjLst, libApiName) |
| Get all overloaded API strings for a given API name 获取给定API名称的所有重载API字符串 More... | |
| def | getAPILst (filePath) |
| Parse API list from a library extraction file 从库API提取文件中解析API列表 More... | |
| def | lib2json (sourceFilePath, saveFilePath) |
| Traverse all library API versions and consolidate into a JSON file 遍历所有版本的库API,将其整理成一个json格式的文件 More... | |
| def | loadLib (libName, version) |
| Load the extracted definitions of lib APIs for static signature mapping 把之前抽取出来的库API加载到字典中,在项目API与库API匹配的时候需要用到 More... | |
Provide utility functions for loading and processing lib APIs.
Loads pre-extracted library API definitions from LibAPIExtraction/ for static signature matching. Provides lib2json() to consolidate per-version API definitions into a single JSON file. 从LibAPIExtraction/加载预提取的库API定义用于静态签名匹配。提供lib2json() 将按版本的API定义合并为单个JSON文件。
| def loadData.func | ( | libApiObjLst, | |
| libApiName | |||
| ) |
Get all overloaded API strings for a given API name 获取给定API名称的所有重载API字符串
| libApiObjLst | List of API objects |
| libApiName | The API name to search for |
Definition at line 83 of file loadData.py.
| def loadData.getAPILst | ( | filePath | ) |
Parse API list from a library extraction file 从库API提取文件中解析API列表
这个应该和loadlib合并到一起
| filePath | Path to the extracted API definition file |
Definition at line 99 of file loadData.py.
| def loadData.lib2json | ( | sourceFilePath, | |
| saveFilePath | |||
| ) |
Traverse all library API versions and consolidate into a JSON file 遍历所有版本的库API,将其整理成一个json格式的文件
The output JSON is keyed by API name, with each value being a list of per-version dictionaries: {APIName: [{'1.1.0': [LibAPI1,...]}, ...]}
| sourceFilePath | Directory containing per-version API extraction files |
| saveFilePath | Path where the consolidated JSON file is saved |
Definition at line 129 of file loadData.py.
| def loadData.loadLib | ( | libName, | |
| version | |||
| ) |
Load the extracted definitions of lib APIs for static signature mapping 把之前抽取出来的库API加载到字典中,在项目API与库API匹配的时候需要用到
| libName | The upgraded lib name |
| version | The lib's version |
Definition at line 30 of file loadData.py.