| 1118 | } |
| 1119 | |
| 1120 | static cell_t FrameIterator_LineNumber(IPluginContext *pContext, const cell_t *params) |
| 1121 | { |
| 1122 | Handle_t hndl = (Handle_t)params[1]; |
| 1123 | HandleError err; |
| 1124 | SafeFrameIterator *iterator; |
| 1125 | |
| 1126 | HandleSecurity sec; |
| 1127 | sec.pIdentity = g_pCoreIdent; |
| 1128 | sec.pOwner = pContext->GetIdentity(); |
| 1129 | |
| 1130 | if ((err=handlesys->ReadHandle(hndl, g_FrameIter, &sec, (void **)&iterator)) != HandleError_None) |
| 1131 | { |
| 1132 | return pContext->ThrowNativeError("Could not read Handle %x (error %d)", hndl, err); |
| 1133 | } |
| 1134 | |
| 1135 | int lineNum = iterator->LineNumber(); |
| 1136 | if (lineNum < 0) |
| 1137 | { |
| 1138 | return pContext->ThrowNativeError("Iterator out of bounds. Check return value of FrameIterator.Next"); |
| 1139 | } |
| 1140 | |
| 1141 | return lineNum; |
| 1142 | } |
| 1143 | |
| 1144 | static cell_t FrameIterator_GetFunctionName(IPluginContext *pContext, const cell_t *params) |
| 1145 | { |
nothing calls this directly
no test coverage detected