Commit Graph

2 Commits

Author SHA1 Message Date
Ivan Enderlin
1d555301f7 feat(runtime-c-api) Check buffer size before creating the slice.
It's safer to check the buffer size is large enough to hold the error
message before creating the slice from raw parts.

Also, this patch remove the need for `last_error`, simplifying the
code a little bit. The `length` variable is casted to `usize` once.
2019-05-10 15:55:02 +02:00
Ivan Enderlin
96324977b5 feat(runtime-c-api) Extract the error module. 2019-03-29 14:41:39 +01:00