Skip to content

Commit 2b6c8b1

Browse files
committed
Update comments and docstrings
1 parent 9889e91 commit 2b6c8b1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

mypyc/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,6 @@ def mypycify(
725725
rt_file = os.path.join(build_dir, name)
726726
with open(os.path.join(include_dir(), name), encoding="utf-8") as f:
727727
write_file(rt_file, f.read())
728-
# Only add .c files to shared_cfilenames
729728
if name.endswith(".c"):
730729
shared_cfilenames.append(rt_file)
731730

mypyc/ir/deps.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Capsule:
55
"""Defines a C extension capsule that a primitive may require."""
66

77
def __init__(self, name: str) -> None:
8+
# Module fullname, e.g. 'librt.base64'
89
self.name: Final = name
910

1011
def __repr__(self) -> str:
@@ -18,9 +19,14 @@ def __hash__(self) -> int:
1819

1920

2021
class SourceDep:
21-
"""Defines a C source file that a primitive may require."""
22+
"""Defines a C source file that a primitive may require.
23+
24+
Each source file must also have a corresponding .h file (replace .c with .h)
25+
that gets implicitly #included if the source is used.
26+
"""
2227

2328
def __init__(self, path: str) -> None:
29+
# Relative path from mypyc/lib-rt, e.g. 'bytes_extra_ops.c'
2430
self.path: Final = path
2531

2632
def __repr__(self) -> str:

0 commit comments

Comments
 (0)