From 972bb5b6fce5cb02bc9a496a8c49e564f8bddd02 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 22 Feb 2014 23:44:44 +0800 Subject: [PATCH] python: support 'diet' mode --- bindings/python/capstone/__init__.py | 2 +- bindings/python/capstone/capstone.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bindings/python/capstone/__init__.py b/bindings/python/capstone/__init__.py index 08fcfe5b..e24ebfa1 100644 --- a/bindings/python/capstone/__init__.py +++ b/bindings/python/capstone/__init__.py @@ -1 +1 @@ -from capstone import Cs, CsError, cs_disasm_quick, cs_version, cs_support, CS_API_MAJOR, CS_API_MINOR, CS_ARCH_ARM, CS_ARCH_ARM64, CS_ARCH_MIPS, CS_ARCH_X86, CS_ARCH_PPC, CS_ARCH_ALL, CS_MODE_LITTLE_ENDIAN, CS_MODE_ARM, CS_MODE_THUMB, CS_OPT_SYNTAX, CS_OPT_SYNTAX_DEFAULT, CS_OPT_SYNTAX_INTEL, CS_OPT_SYNTAX_ATT, CS_OPT_SYNTAX_NOREGNAME, CS_OPT_DETAIL, CS_OPT_ON, CS_OPT_OFF, CS_MODE_16, CS_MODE_32, CS_MODE_64, CS_MODE_BIG_ENDIAN, CS_MODE_MICRO, CS_MODE_N64 +from capstone import Cs, CsError, cs_disasm_quick, cs_version, cs_support, CS_API_MAJOR, CS_API_MINOR, CS_ARCH_ARM, CS_ARCH_ARM64, CS_ARCH_MIPS, CS_ARCH_X86, CS_ARCH_PPC, CS_ARCH_ALL, CS_MODE_LITTLE_ENDIAN, CS_MODE_ARM, CS_MODE_THUMB, CS_OPT_SYNTAX, CS_OPT_SYNTAX_DEFAULT, CS_OPT_SYNTAX_INTEL, CS_OPT_SYNTAX_ATT, CS_OPT_SYNTAX_NOREGNAME, CS_OPT_DETAIL, CS_OPT_ON, CS_OPT_OFF, CS_MODE_16, CS_MODE_32, CS_MODE_64, CS_MODE_BIG_ENDIAN, CS_MODE_MICRO, CS_MODE_N64, CS_SUPPORT_DIET diff --git a/bindings/python/capstone/capstone.py b/bindings/python/capstone/capstone.py index bd72f550..3cf640a8 100644 --- a/bindings/python/capstone/capstone.py +++ b/bindings/python/capstone/capstone.py @@ -50,6 +50,8 @@ __all__ = [ 'CS_ERR_OPTION', 'CS_ERR_DETAIL', 'CS_ERR_VERSION', + + 'CS_SUPPORT_DIET', ] # Capstone C interface @@ -103,6 +105,7 @@ CS_ERR_OPTION = 6 # Invalid/unsupported option: cs_option() CS_ERR_DETAIL = 7 # Invalid/unsupported option: cs_option() CS_ERR_VERSION = 9 # Unsupported version (bindings) +CS_SUPPORT_DIET = 0xFFFF+1 import ctypes, ctypes.util, sys from os.path import split, join, dirname