Move load_func_body_from_file to utils module
This commit is contained in:
parent
8029d26c6b
commit
cb093cc030
@ -1,4 +1,5 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from .utils import load_func_body_from_file
|
||||||
from .datatypes import (
|
from .datatypes import (
|
||||||
CDataType,
|
CDataType,
|
||||||
CStruct,
|
CStruct,
|
||||||
@ -307,8 +308,3 @@ def test_doubly_linked_list():
|
|||||||
|
|
||||||
header.save(Path("."))
|
header.save(Path("."))
|
||||||
source.save(Path("."))
|
source.save(Path("."))
|
||||||
|
|
||||||
|
|
||||||
def load_func_body_from_file(filename: Path) -> str:
|
|
||||||
with open(filename, "r") as infile:
|
|
||||||
return infile.read()
|
|
||||||
|
6
codegen/utils.py
Normal file
6
codegen/utils.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def load_func_body_from_file(filename: Path) -> str:
|
||||||
|
with open(filename, "r") as infile:
|
||||||
|
return infile.read()
|
Loading…
Reference in New Issue
Block a user