예제 #1
0
VOID Rtn(RTN rtn, VOID * v)
{
    RTN_Open(rtn);
    UINT32 insNum2 = 0;
    RTN_Close(rtn);// The rtn is intentionally closed and then it is opened again.
                   // This is done in order to check the correctness of both
                   // "RTN_NumIns" and "RTN_InsTail" independently.
                
    UINT32 insNum1 = RTN_NumIns(rtn);
    RTN_Open(rtn);
    for (INS ins = RTN_InsTail(rtn); INS_Valid(ins); ins = INS_Prev(ins)) {
        insNum2++;
    }
    TEST(insNum1 == insNum2, "RTN_NumIns failed");
    RTN_Close(rtn);
}
예제 #2
0
파일: lua_rtn.cpp 프로젝트: cherry-wb/pint
int rtn_num_ins (lua_State *L) {
  RTN* v1 = check_rtn(L,1);
  UINT32 r = RTN_NumIns(*v1);
  lua_pushnumber(L, r);
  return 1;
}
예제 #3
0
파일: RTN.cpp 프로젝트: ancat/python-pin
PyObject* Python_RTN_NumIns(PyObject* self, PyObject* args) {
    PyObject* rtn;
    PyArg_ParseTuple(args, "L", &rtn);
    RTN rtn_object = *(RTN*) rtn;
    return Py_BuildValue("L", RTN_NumIns(rtn_object));
}