mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-24 18:16:55 +01:00
78c79f85b9
What's new: - Proper multi-threaded support - Better PyObject reference counting with ref_t and newref_t helper classes - Improved the pywraps/deployment script - Added IDAViewWrapper class and example - Added idc.GetDisasmEx() - Added idc.AddSegEx() - Added idc.GetLocalTinfo() - Added idc.ApplyType() - Updated type information implementation - Introduced the idaapi.require() - see http://www.hexblog.com/?p=749 - set REMOVE_CWD_SYS_PATH=1 by default in python.cfg (remove current directory from the import search path). Various bugfixes: - fixed various memory leaks - asklong/askaddr/asksel (and corresponding idc.py functions) were returning results truncated to 32 bits in IDA64 - fix wrong documentation for idc.SizeOf - GetFloat/GetDouble functions did not take into account endianness of the processor - idaapi.NO_PROCESS was not defined, and was causing GetProcessPid() to fail - idc.py: insert escape characters to string parameter when call Eval() - idc.SaveFile/savefile were always overwriting an existing file instead of writing only the new data - PluginForm.Close() wasn't passing its arguments to the delegate function, resulting in an error.
140 lines
3.5 KiB
OpenEdge ABL
140 lines
3.5 KiB
OpenEdge ABL
// Ignore kernel only & unexported symbols
|
|
%ignore netlink;
|
|
|
|
%ignore RootNode;
|
|
%ignore for_all_supvals;
|
|
%ignore netErrorHandler;
|
|
%ignore netnode_key_count;
|
|
|
|
%ignore netnode_check;
|
|
%ignore netnode_kill;
|
|
%ignore netnode_start;
|
|
%ignore netnode_end;
|
|
%ignore netnode_next;
|
|
%ignore netnode_prev;
|
|
%ignore netnode_name;
|
|
%ignore netnode_rename;
|
|
%ignore netnode_valobj;
|
|
%ignore netnode_valstr;
|
|
%ignore netnode_set;
|
|
%ignore netnode_delvalue;
|
|
%ignore netnode_altval;
|
|
%ignore netnode_charval;
|
|
%ignore netnode_altval_idx8;
|
|
%ignore netnode_charval_idx8;
|
|
%ignore netnode_supval;
|
|
%ignore netnode_supstr;
|
|
%ignore netnode_supset;
|
|
%ignore netnode_supdel;
|
|
%ignore netnode_sup1st;
|
|
%ignore netnode_supnxt;
|
|
%ignore netnode_suplast;
|
|
%ignore netnode_supprev;
|
|
%ignore netnode_supval_idx8;
|
|
%ignore netnode_supstr_idx8;
|
|
%ignore netnode_supset_idx8;
|
|
%ignore netnode_supdel_idx8;
|
|
%ignore netnode_sup1st_idx8;
|
|
%ignore netnode_supnxt_idx8;
|
|
%ignore netnode_suplast_idx8;
|
|
%ignore netnode_supprev_idx8;
|
|
%ignore netnode_supdel_all;
|
|
%ignore netnode_supdel_range;
|
|
%ignore netnode_supdel_range_idx8;
|
|
%ignore netnode_hashval;
|
|
%ignore netnode_hashstr;
|
|
%ignore netnode_hashval_long;
|
|
%ignore netnode_hashset;
|
|
%ignore netnode_hashdel;
|
|
%ignore netnode_hash1st;
|
|
%ignore netnode_hashnxt;
|
|
%ignore netnode_hashlast;
|
|
%ignore netnode_hashprev;
|
|
%ignore netnode_blobsize;
|
|
%ignore netnode_getblob;
|
|
%ignore netnode_setblob;
|
|
%ignore netnode_delblob;
|
|
%ignore netnode_inited;
|
|
%ignore netnode_copy;
|
|
%ignore netnode_altshift;
|
|
%ignore netnode_charshift;
|
|
%ignore netnode_supshift;
|
|
%ignore netnode_altadjust;
|
|
%ignore netnode_exist;
|
|
|
|
%ignore netnode::truncate_zero_pages;
|
|
%ignore netnode::append_zero_pages;
|
|
%ignore netnode::createbase;
|
|
%ignore netnode::checkbase;
|
|
%ignore netnode::set_close_flag;
|
|
%ignore netnode::reserve_nodes;
|
|
%ignore netnode::validate;
|
|
%ignore netnode::upgrade16;
|
|
%ignore netnode::upgrade;
|
|
%ignore netnode::compress;
|
|
%ignore netnode::inited;
|
|
%ignore netnode::init;
|
|
%ignore netnode::can_write;
|
|
%ignore netnode::flush;
|
|
%ignore netnode::get_linput;
|
|
%ignore netnode::term;
|
|
%ignore netnode::killbase;
|
|
%ignore netnode::getdrive;
|
|
%ignore netnode::getgraph;
|
|
%ignore netnode::registerbase;
|
|
%ignore netnode::setbase;
|
|
|
|
%ignore netnode::altadjust;
|
|
%ignore netnode::getblob(void *buf, size_t *bufsize, nodeidx_t start, char tag);
|
|
%ignore netnode::operator nodeidx_t;
|
|
|
|
// Renaming one version of hashset() otherwise SWIG will not be able to activate the other one
|
|
%rename (hashset_idx) netnode::hashset(const char *idx, nodeidx_t value, char tag=htag);
|
|
|
|
%include "netnode.hpp"
|
|
|
|
%extend netnode
|
|
{
|
|
nodeidx_t index()
|
|
{
|
|
return self->operator nodeidx_t();
|
|
}
|
|
|
|
PyObject *getblob(nodeidx_t start, const char *tag)
|
|
{
|
|
// Get the blob and let IDA allocate the memory
|
|
size_t bufsize;
|
|
void *buf = self->getblob(NULL, &bufsize, start, *tag);
|
|
if ( buf == NULL )
|
|
Py_RETURN_NONE;
|
|
// Create a Python string
|
|
PyObject *py_str = PyString_FromStringAndSize((const char *)buf, bufsize);
|
|
// Free memory
|
|
qfree(buf);
|
|
|
|
return py_str;
|
|
}
|
|
|
|
PyObject *hashstr_buf(const char *idx, char tag=htag)
|
|
{
|
|
char buf[MAXSPECSIZE];
|
|
ssize_t sz = self->hashstr(idx, buf, sizeof(buf), tag);
|
|
if ( sz < 0 )
|
|
Py_RETURN_NONE;
|
|
else
|
|
return PyString_FromStringAndSize(buf, sz);
|
|
}
|
|
|
|
bool hashset_buf(const char *idx, PyObject *py_str, char tag=htag)
|
|
{
|
|
char *buf;
|
|
Py_ssize_t sz;
|
|
|
|
if ( PyString_AsStringAndSize(py_str, &buf, &sz) == -1 )
|
|
return false;
|
|
else
|
|
return self->hashset(idx, buf, sz, tag);
|
|
}
|
|
}
|
|
|