diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-06-28 06:46:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-06-28 06:46:55 +0200 |
commit | ecf964d43cfb36def48809fe47e43f60a5f2e4b1 (patch) | |
tree | 9dd3a4e4fde84001e0b884b812976952340d5992 /src/grt/grt-vstrings.adb | |
parent | 9d38f14e5180a4b30c4dbb11ecbf954b3473bce9 (diff) | |
download | ghdl-ecf964d43cfb36def48809fe47e43f60a5f2e4b1.tar.gz ghdl-ecf964d43cfb36def48809fe47e43f60a5f2e4b1.tar.bz2 ghdl-ecf964d43cfb36def48809fe47e43f60a5f2e4b1.zip |
vpi: use a variable buffer for vpi_get_value.
vstrings: add Reset and Get_C_String.
Close #98
Diffstat (limited to 'src/grt/grt-vstrings.adb')
-rw-r--r-- | src/grt/grt-vstrings.adb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/grt/grt-vstrings.adb b/src/grt/grt-vstrings.adb index 30c58ab41..d5d14c856 100644 --- a/src/grt/grt-vstrings.adb +++ b/src/grt/grt-vstrings.adb @@ -47,6 +47,11 @@ package body Grt.Vstrings is Len => 0); end Free; + procedure Reset (Vstr : in out Vstring) is + begin + Vstr.Len := 0; + end Reset; + procedure Grow (Vstr : in out Vstring; Sum : Natural) is Nlen : constant Natural := Vstr.Len + Sum; @@ -118,6 +123,11 @@ package body Grt.Vstrings is end if; end Put; + function Get_C_String (Vstr : Vstring) return Ghdl_C_String is + begin + return To_Ghdl_C_String (Vstr.Str.all'Address); + end Get_C_String; + procedure Free (Rstr : in out Rstring) is begin Free (Rstr.Str); |