-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
native library shared object support
- Loading branch information
Showing
7 changed files
with
173 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "native/eosio/crt.hpp" | ||
|
||
#include <cstdio> | ||
|
||
eosio::cdt::output_stream std_out; | ||
eosio::cdt::output_stream std_err; | ||
|
||
bool ___disable_output = false; | ||
bool ___has_failed = false; | ||
bool ___earlier_unit_test_has_failed = false; | ||
|
||
void _prints_l(const char* cstr, uint32_t len, uint8_t which) { | ||
for (int i=0; i < len; i++) { | ||
if (which == eosio::cdt::output_stream_kind::std_out) | ||
std_out.push(cstr[i]); | ||
else if (which == eosio::cdt::output_stream_kind::std_err) | ||
std_err.push(cstr[i]); | ||
if (!___disable_output) { | ||
std::putc(cstr[i], which == eosio::cdt::output_stream_kind::std_out ? stdout : stderr); | ||
} | ||
} | ||
} | ||
void _prints(const char* cstr, uint8_t which) { | ||
for (int i=0; cstr[i] != '\0'; i++) { | ||
if (which == eosio::cdt::output_stream_kind::std_out) | ||
std_out.push(cstr[i]); | ||
else if (which == eosio::cdt::output_stream_kind::std_err) | ||
std_err.push(cstr[i]); | ||
if (!___disable_output) | ||
std::putc(cstr[i], which == eosio::cdt::output_stream_kind::std_out ? stdout : stderr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.