mirror of
https://github.com/idapython/src
synced 2026-06-08 14:47:00 +00:00
c04b70e0e5
Specifically: BUGFIX: IDAPython's choose.choose() was broken. BUGFIX: calling idaapi.del_hotkey() twice with the same argument could crash IDA. BUGFIX: IDAPython's IDC emulation of idc.GetTevRegMem() was not working. BUGFIX: IDAPython: execute_ui_requests() could crash IDA. BUGFIX: IDAPython: IDP_Hooks instances could prevent the decompiler from working properly
15 lines
417 B
Python
15 lines
417 B
Python
# -----------------------------------------------------------------------
|
|
# This is an example illustrating how to extend IDC from Python
|
|
# (c) Hex-Rays
|
|
#
|
|
from idaapi import set_idc_func_ex
|
|
|
|
def py_power(n, e):
|
|
return n ** e
|
|
|
|
ok = set_idc_func_ex("pow", py_power, (idaapi.VT_LONG, idaapi.VT_LONG), 0)
|
|
if ok:
|
|
print("Now the pow() will be present IDC!")
|
|
else:
|
|
print("Failed to register pow() IDC function")
|