Document the libsolc API

This commit is contained in:
Alex Beregszaszi 2019-01-22 17:18:27 +00:00
parent 26c06550b0
commit 1684c70f7d

View File

@ -34,12 +34,25 @@
extern "C" {
#endif
/// Callback used to retrieve additional source files. "Returns" two pointers that should be
/// heap-allocated and are free'd by the caller.
/// Callback used to retrieve additional source files.
///
/// "Returns" two pointers that should be heap-allocated and are free'd by the caller.
typedef void (*CStyleReadFileCallback)(char const* _path, char** o_contents, char** o_error);
/// Returns the complete license document.
///
/// The pointer returned must not be freed by the caller.
char const* solidity_license() SOLC_NOEXCEPT;
/// Returns the compiler version.
///
/// The pointer returned must not be freed by the caller.
char const* solidity_version() SOLC_NOEXCEPT;
/// Takes a "Standard Input JSON" and an optional callback (can be set to null). Returns
/// a "Standard Output JSON". Both are to be UTF-8 encoded.
///
/// The pointer returned must not be freed by the caller.
char const* solidity_compile(char const* _input, CStyleReadFileCallback _readCallback) SOLC_NOEXCEPT;
#ifdef __cplusplus