mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
ab3a7cb21f
Summary: In preparation for merging fb-mercurial sources to the Eden repository, move everything from the top-level directory into an `eden/scm` subdirectory.
26 lines
807 B
Python
26 lines
807 B
Python
# Copyright 2019 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
import os
|
|
import re
|
|
|
|
|
|
def checkpath(path, dllnames):
|
|
content = open(path).read()
|
|
for name in dllnames:
|
|
for matched in sorted(set(re.findall(r"%s\.[^(.]*\(" % name, content))):
|
|
# remove tailing "("
|
|
funcname = matched[:-1]
|
|
for expected in ["%s.argtypes" % funcname, "%s.restype" % funcname]:
|
|
if expected not in content:
|
|
print("%s needs explicit argtypes and restype" % funcname)
|
|
break
|
|
|
|
|
|
checkpath(
|
|
"%s/../edenscm/mercurial/win32.py" % os.environ.get("RUNTESTDIR", "."),
|
|
["_kernel32", "_advapi32", "_user32", "_crypt32"],
|
|
)
|