interface
| 1359 | |
| 1360 | // interface |
| 1361 | int asCScriptEngine::WriteMessage(const char *section, int row, int col, asEMsgType type, const char *message) |
| 1362 | { |
| 1363 | // Validate input parameters |
| 1364 | if( section == 0 || |
| 1365 | message == 0 ) |
| 1366 | return asINVALID_ARG; |
| 1367 | |
| 1368 | // If there is no callback then there's nothing to do |
| 1369 | if( !msgCallback ) |
| 1370 | return 0; |
| 1371 | |
| 1372 | // If a pre-message has been set, then write that first |
| 1373 | if( preMessage.isSet ) |
| 1374 | { |
| 1375 | asSMessageInfo msg; |
| 1376 | msg.section = preMessage.scriptname.AddressOf(); |
| 1377 | msg.row = preMessage.r; |
| 1378 | msg.col = preMessage.c; |
| 1379 | msg.type = asMSGTYPE_INFORMATION; |
| 1380 | msg.message = preMessage.message.AddressOf(); |
| 1381 | |
| 1382 | if( msgCallbackFunc.callConv < ICC_THISCALL ) |
| 1383 | CallGlobalFunction(&msg, msgCallbackObj, &msgCallbackFunc, 0); |
| 1384 | else |
| 1385 | CallObjectMethod(msgCallbackObj, &msg, &msgCallbackFunc, 0); |
| 1386 | |
| 1387 | preMessage.isSet = false; |
| 1388 | } |
| 1389 | |
| 1390 | // Write the message to the callback |
| 1391 | asSMessageInfo msg; |
| 1392 | msg.section = section; |
| 1393 | msg.row = row; |
| 1394 | msg.col = col; |
| 1395 | msg.type = type; |
| 1396 | msg.message = message; |
| 1397 | |
| 1398 | if( msgCallbackFunc.callConv < ICC_THISCALL ) |
| 1399 | CallGlobalFunction(&msg, msgCallbackObj, &msgCallbackFunc, 0); |
| 1400 | else |
| 1401 | CallObjectMethod(msgCallbackObj, &msg, &msgCallbackFunc, 0); |
| 1402 | |
| 1403 | return 0; |
| 1404 | } |
| 1405 | |
| 1406 | int asCScriptEngine::SetJITCompiler(asIJITCompilerAbstract *compiler) |
| 1407 | { |