diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-14 18:26:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-14 18:26:25 +0200 |
commit | 5ec4adc52ffacb8407d17dc728e45f7ac8f66261 (patch) | |
tree | 30974cbd6cea97562b0253ba4b605ce1eaae2c30 /src/vhdl/python/libghdl/__init__.py | |
parent | 43d0db7f5a91f7c936faedc23afafeca27c6058d (diff) | |
download | ghdl-5ec4adc52ffacb8407d17dc728e45f7ac8f66261.tar.gz ghdl-5ec4adc52ffacb8407d17dc728e45f7ac8f66261.tar.bz2 ghdl-5ec4adc52ffacb8407d17dc728e45f7ac8f66261.zip |
python/libghdl: refactoring
Diffstat (limited to 'src/vhdl/python/libghdl/__init__.py')
-rw-r--r-- | src/vhdl/python/libghdl/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vhdl/python/libghdl/__init__.py b/src/vhdl/python/libghdl/__init__.py index 8ca7a977b..6589aec3f 100644 --- a/src/vhdl/python/libghdl/__init__.py +++ b/src/vhdl/python/libghdl/__init__.py @@ -14,3 +14,20 @@ _prefix = os.path.join(_basedir, "ghdl") _prefix_opt = ("--PREFIX=" + _prefix).encode('utf-8') libghdl.libghdl__set_option( ctypes.c_char_p(_prefix_opt), len(_prefix_opt)) + +# libghdl + +_set_option = libghdl.libghdl__set_option +_analyze_file = libghdl.libghdl__analyze_file + + +def set_option(opt): + return _set_option(ctypes.c_char_p(opt), len(opt)) + + +def analyze_init(): + return libghdl.libghdl__analyze_init() + + +def analyze_file(filename): + return _analyze_file(ctypes.c_char_p(filename), len(filename)) |