mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-24 01:59:18 +01:00
Fixed compilation bugs:
- Fixed small mismatch between SWIG define and CL defines (/DNO_OBSOLETE_FUNCS) - Use print_type2() instead of the deprecated function print_type()
This commit is contained in:
parent
21cd5a95eb
commit
4e295155bb
7
build.py
7
build.py
@ -358,6 +358,9 @@ def build_plugin(platform, idasdkdir, plugin_name, ea64):
|
||||
if not '--no-early-load' in sys.argv:
|
||||
platform_macros.append("PLUGINFIX")
|
||||
|
||||
# Turn off obsolete functions
|
||||
platform_macros.append("NO_OBSOLETE_FUNCS")
|
||||
|
||||
# Build the wrapper from the interface files
|
||||
ea64flag = ea64 and "-D__EA64__" or ""
|
||||
swigcmd = "swig %s -Iswig -o idaapi.cpp %s -I%s idaapi.i" % (SWIG_OPTIONS, ea64flag, ida_include_directory)
|
||||
@ -419,13 +422,17 @@ def build_binary_package(ea64, nukeold):
|
||||
platform_string)
|
||||
# Build the plugin
|
||||
build_plugin(platform_string, IDA_SDK, plugin_name, ea64)
|
||||
|
||||
# Build the binary distribution
|
||||
binmanifest = []
|
||||
if nukeold:
|
||||
binmanifest.extend(BINDIST_MANIFEST)
|
||||
|
||||
if not ea64 or nukeold:
|
||||
binmanifest.extend([(x, "python") for x in "python/init.py", "python/idc.py", "python/idautils.py", "idaapi.py"])
|
||||
|
||||
binmanifest.append((plugin_name, "plugins"))
|
||||
|
||||
build_distribution(binmanifest, BINDISTDIR, ea64, nukeold)
|
||||
|
||||
|
||||
|
@ -319,7 +319,7 @@ static PyObject *ph_get_instruc()
|
||||
{
|
||||
Py_ssize_t i = 0;
|
||||
PyObject *py_result = PyTuple_New(ph.instruc_end - ph.instruc_start);
|
||||
for ( instruc_t *p = ph.instruc + ph.instruc_start, *end = ph.instruc + ph.instruc_end;
|
||||
for ( const instruc_t *p = ph.instruc + ph.instruc_start, *end = ph.instruc + ph.instruc_end;
|
||||
p != end;
|
||||
++p )
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ def print_type(ea, on_line):
|
||||
static PyObject *py_print_type(ea_t ea, bool one_line)
|
||||
{
|
||||
char buf[MAXSTR];
|
||||
if ( print_type(ea, buf, sizeof(buf), one_line) )
|
||||
if ( print_type2(ea, buf, sizeof(buf), one_line ? PRTYPE_1LINE : PRTYPE_MULTI) )
|
||||
{
|
||||
qstrncat(buf, ";", sizeof(buf));
|
||||
return PyString_FromString(buf);
|
||||
|
@ -241,7 +241,7 @@ def print_type(ea, on_line):
|
||||
static PyObject *py_print_type(ea_t ea, bool one_line)
|
||||
{
|
||||
char buf[MAXSTR];
|
||||
if ( print_type(ea, buf, sizeof(buf), one_line) )
|
||||
if ( print_type2(ea, buf, sizeof(buf), one_line ? PRTYPE_1LINE : PRTYPE_MULTI) )
|
||||
{
|
||||
qstrncat(buf, ";", sizeof(buf));
|
||||
return PyString_FromString(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user