Skip to content

Commit

Permalink
Switch to VIREO_FUNCTION_SIGNATURET
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite authored and cglzaguilar committed Feb 7, 2019
1 parent ddb981e commit 8f86bd8
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions source/io/FileIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,26 @@ VIREO_FUNCTION_SIGNATURE2(Println, StaticType, void)
}
#endif
//------------------------------------------------------------
// An instruction to enable the Write to System Log VI which uses an SLI call to SystemLogging_WriteMessageUTF8
// ignored(0), ignored(1), message(2), severity(3), error cluster(4)
#if kVireoOS_emscripten
VIREO_FUNCTION_SIGNATURE5(SystemLogging_WriteMessageUTF8, StringRef, StringRef, StringRef, Int32, ErrorCluster)
struct SystemLogging_WriteMessageUTF8ParamBlock : InstructionCore
{
_ParamDef(StringRef, Ignored0In);
_ParamDef(StringRef, Ignored1In);
_ParamDef(StringRef, MessageIn);
_ParamDef(Int32, SeverityIn);
_ParamDef(ErrorCluster, ErrorInOut);
NEXT_INSTRUCTION_METHOD()
};

// An instruction to enable the Write to System Log VI which uses an SLI call to SystemLogging_WriteMessageUTF8
VIREO_FUNCTION_SIGNATURET(SystemLogging_WriteMessageUTF8, SystemLogging_WriteMessageUTF8ParamBlock)
{
TypeRef typeRefInt32 = TypeManagerScope::Current()->FindType("Int32");

if (!_Param(4).status) {
if (!_Param(ErrorInOut).status) {
jsSystemLogging_WriteMessageUTF8(
_Param(2)->Type(), _ParamPointer(2),
typeRefInt32, _ParamPointer(3));
_Param(MessageIn)->Type(), _ParamPointer(MessageIn),
typeRefInt32, _ParamPointer(SeverityIn));
}
return _NextInstruction();
}
Expand Down

0 comments on commit 8f86bd8

Please sign in to comment.