about summary refs log tree commit diff stats
path: root/example
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2019-02-13 15:37:25 +0100
committerGitHub <noreply@github.com>2019-02-13 15:37:25 +0100
commita4d9c5c598bb03215dc77ac7433934ed2e21b7fe (patch)
treecf638332d6bee1b8301a81f096bbdf582935a4c2 /example
parent29ffd402cd4c20b1e5164b94f8ba74d1f35f4a81 (diff)
parent1578f2e84c3137279658c08cbd88a0d7764eb952 (diff)
downloadmiasm-a4d9c5c598bb03215dc77ac7433934ed2e21b7fe.tar.gz
miasm-a4d9c5c598bb03215dc77ac7433934ed2e21b7fe.zip
Merge pull request #975 from commial/feature/objc-c-type-cache
ObjC C type cache
Diffstat (limited to 'example')
-rw-r--r--example/expression/expr_c.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/expression/expr_c.py b/example/expression/expr_c.py
index e0825799..37c9f510 100644
--- a/example/expression/expr_c.py
+++ b/example/expression/expr_c.py
@@ -42,7 +42,7 @@ ptr_rectangle = types_mngr.get_objc(CTypePtr(CTypeStruct('rectangle')))
 
 ptr = ExprId('ptr', 64)
 c_context = {ptr.name: ptr_rectangle}
-mychandler = CHandler(types_mngr, {})
+mychandler = CHandler(types_mngr, C_types=c_context)
 
 # Parse some C accesses
 c_acceses = ["ptr->width",
@@ -54,8 +54,8 @@ c_acceses = ["ptr->width",
             ]
 
 for c_str in c_acceses:
-    expr = mychandler.c_to_expr(c_str, c_context)
-    c_type = mychandler.c_to_type(c_str, c_context)
+    expr = mychandler.c_to_expr(c_str)
+    c_type = mychandler.c_to_type(c_str)
     print 'C access:', c_str
     print '\tExpr:', expr
     print '\tType:', c_type