diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-07-07 08:04:07 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-07-07 12:32:47 +0200 |
| commit | 0da61c83fdf9053b043391634a175b104b332e42 (patch) | |
| tree | ca4d263d99382a919564e467740a20679f31bb54 /miasm2/ir/ir.py | |
| parent | e3a4a92ae8300b51d02d9caa43ca9599fdf851f5 (diff) | |
| download | miasm-0da61c83fdf9053b043391634a175b104b332e42.tar.gz miasm-0da61c83fdf9053b043391634a175b104b332e42.zip | |
IR: rename get_bloc
Diffstat (limited to '')
| -rw-r--r-- | miasm2/ir/ir.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py index 7c39cf04..67881ae6 100644 --- a/miasm2/ir/ir.py +++ b/miasm2/ir/ir.py @@ -477,13 +477,21 @@ class IntermediateRepresentation(object): addr = self.symbol_pool.getby_name_create(addr.name) return addr - def get_bloc(self, addr): + def get_block(self, addr): """Returns the irbloc associated to an ExprId/ExprInt/label/int @addr: an ExprId/ExprInt/label/int""" label = self.get_label(addr) return self.blocks.get(label, None) + def get_bloc(self, addr): + """ + DEPRECATED function + Use get_block instead of get_block + """ + warnings.warn('DEPRECATION WARNING: use "get_block" instead of "get_bloc"') + return self.get_block(addr) + def add_instr(self, line, addr=0, gen_pc_updt=False): block = AsmBlock(self.gen_label()) block.lines = [line] |