diff options
author | Unai Martinez-Corral <38422348+umarcor@users.noreply.github.com> | 2021-06-23 16:07:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 16:07:10 +0100 |
commit | c6283d9a9b40c3e9afeba912fcb13aa9d56b9c52 (patch) | |
tree | e1706cb19a2439e3d94657e54c688a36c703f048 /pyGHDL/libghdl | |
parent | 983236ac3dfd0c455a0ac910a9a468ea2c81e5d9 (diff) | |
parent | 240b4fdd90a9f3ca04e8e168bffdc92bea2ca3f3 (diff) | |
download | ghdl-c6283d9a9b40c3e9afeba912fcb13aa9d56b9c52.tar.gz ghdl-c6283d9a9b40c3e9afeba912fcb13aa9d56b9c52.tar.bz2 ghdl-c6283d9a9b40c3e9afeba912fcb13aa9d56b9c52.zip |
DOM: Functions and types (#1804)
Diffstat (limited to 'pyGHDL/libghdl')
-rw-r--r-- | pyGHDL/libghdl/__init__.py | 11 | ||||
-rw-r--r-- | pyGHDL/libghdl/_decorator.py | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pyGHDL/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py index 0d3c75fa1..525710590 100644 --- a/pyGHDL/libghdl/__init__.py +++ b/pyGHDL/libghdl/__init__.py @@ -37,6 +37,7 @@ import os import sys from pathlib import Path from shutil import which +from typing import List from pydecor import export @@ -48,7 +49,15 @@ from pyGHDL.libghdl.version import __version__ class LibGHDLException(GHDLBaseException): - pass + _internalErrors: List[str] + + def __init__(self, message: str, errors: List[str]): + super().__init__(message) + self._internalErrors = errors + + @property + def InternalErrors(self): + return self._internalErrors def _get_libghdl_name() -> Path: diff --git a/pyGHDL/libghdl/_decorator.py b/pyGHDL/libghdl/_decorator.py index 2001cb37e..a680cc9d1 100644 --- a/pyGHDL/libghdl/_decorator.py +++ b/pyGHDL/libghdl/_decorator.py @@ -93,7 +93,7 @@ def BindToLibGHDL(subprogramName): return None elif typ is int: return c_int32 - elif type is float: + elif typ is float: return c_double elif typ is bool: return c_bool |