Skip to content

Commit

Permalink
python: indentation for cython code. also added author credits to the…
Browse files Browse the repository at this point in the history
…se new files
  • Loading branch information
aquynh committed Jan 13, 2014
1 parent aaaf345 commit a84fe66
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 187 deletions.
80 changes: 41 additions & 39 deletions bindings/python/pyx/ccapstone.pxd
Original file line number Diff line number Diff line change
@@ -1,65 +1,67 @@
# By Dang Hoang Vu <[email protected]>, 2014

from libcpp cimport bool
from libc.stdint cimport uint8_t, uint64_t, uint16_t

cdef extern from "<capstone/capstone.h>":

ctypedef size_t csh
ctypedef size_t csh

ctypedef enum cs_mode:
pass
ctypedef enum cs_mode:
pass

ctypedef enum cs_arch:
pass
ctypedef enum cs_arch:
pass

ctypedef struct cs_detail:
pass
ctypedef struct cs_detail:
pass

ctypedef struct cs_insn:
unsigned int id
uint64_t address
uint16_t size
uint8_t bytes[16]
char mnemonic[32]
char op_str[96]
cs_detail *detail
ctypedef struct cs_insn:
unsigned int id
uint64_t address
uint16_t size
uint8_t bytes[16]
char mnemonic[32]
char op_str[96]
cs_detail *detail

ctypedef enum cs_err:
pass
ctypedef enum cs_err:
pass

ctypedef enum cs_opt_type:
pass
ctypedef enum cs_opt_type:
pass

unsigned int cs_version(int *major, int *minor)
unsigned int cs_version(int *major, int *minor)

bool cs_support(int arch)
bool cs_support(int arch)

cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle)
cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle)

cs_err cs_close(csh handle)
cs_err cs_close(csh handle)

cs_err cs_errno(csh handle)
cs_err cs_errno(csh handle)

size_t cs_disasm_ex(csh handle,
const uint8_t *code, size_t code_size,
uint64_t address,
size_t count,
cs_insn **insn)
size_t cs_disasm_ex(csh handle,
const uint8_t *code, size_t code_size,
uint64_t address,
size_t count,
cs_insn **insn)

cs_err cs_option(csh handle, cs_opt_type type, size_t value)
cs_err cs_option(csh handle, cs_opt_type type, size_t value)

void cs_free(cs_insn *insn, size_t count)
void cs_free(cs_insn *insn, size_t count)

const char *cs_reg_name(csh handle, unsigned int reg_id)
const char *cs_reg_name(csh handle, unsigned int reg_id)

const char *cs_insn_name(csh handle, unsigned int insn_id)
const char *cs_insn_name(csh handle, unsigned int insn_id)

bool cs_insn_group(csh handle, cs_insn *insn, unsigned int group_id)
bool cs_insn_group(csh handle, cs_insn *insn, unsigned int group_id)

bool cs_reg_read(csh handle, cs_insn *insn, unsigned int reg_id)
bool cs_reg_read(csh handle, cs_insn *insn, unsigned int reg_id)

bool cs_reg_write(csh handle, cs_insn *insn, unsigned int reg_id)
bool cs_reg_write(csh handle, cs_insn *insn, unsigned int reg_id)

int cs_op_count(csh handle, cs_insn *insn, unsigned int op_type)
int cs_op_count(csh handle, cs_insn *insn, unsigned int op_type)

int cs_op_index(csh handle, cs_insn *insn, unsigned int op_type,
unsigned int position)
int cs_op_index(csh handle, cs_insn *insn, unsigned int op_type,
unsigned int position)
Loading

0 comments on commit a84fe66

Please sign in to comment.