1 Star 0 Fork 2

Mr.W / usrsctp

forked from rason / usrsctp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gen-def.py 602 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env python3
#
# gen-def.py usrsctp.lib
import re
import sys
import subprocess
from shutil import which
try:
lib_file = sys.argv[1]
except:
print('Usage: gen-def.py LIB-FILE')
exit(-1)
print('EXPORTS')
if which('dumpbin'):
dumpbin_cmd = subprocess.run(['dumpbin', '/linkermember:1', lib_file],
stdout=subprocess.PIPE)
pattern = re.compile('\s*[0-9a-fA-F]+ _?(?P<functionname>usrsctp_[^\s]*)')
for line in dumpbin_cmd.stdout.decode('utf-8').splitlines():
match = pattern.match(line)
if match:
print(match.group('functionname'))
1
https://gitee.com/open-nvr/usrsctp.git
git@gitee.com:open-nvr/usrsctp.git
open-nvr
usrsctp
usrsctp
master

搜索帮助