Merge pull request #5849 from ethereum/libsolc-docs

Document the libsolc API
This commit is contained in:
chriseth 2019-01-22 18:29:08 +01:00 committed by GitHub
commit bfdeecccd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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