diff options
author | Sverker Eriksson <[email protected]> | 2012-01-18 17:07:35 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 12:22:57 +0100 |
commit | 272a61ce4cfa7e92a037fbf71bc79ec0456f8b2b (patch) | |
tree | 7aa337eccd647b91e8a91bc1dce8c1be29df3631 /erts/emulator/beam/erl_bif_re.c | |
parent | 166032bddf9a14f3ea6252724532039a1113612d (diff) | |
download | otp-272a61ce4cfa7e92a037fbf71bc79ec0456f8b2b.tar.gz otp-272a61ce4cfa7e92a037fbf71bc79ec0456f8b2b.tar.bz2 otp-272a61ce4cfa7e92a037fbf71bc79ec0456f8b2b.zip |
erts: Refactor new helper function erts_init_trap_export
Diffstat (limited to 'erts/emulator/beam/erl_bif_re.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_re.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c index 6b843d2e08..b036c5ef5c 100644 --- a/erts/emulator/beam/erl_bif_re.c +++ b/erts/emulator/beam/erl_bif_re.c @@ -71,14 +71,9 @@ void erts_init_bif_re(void) erts_pcre_stack_free = &erts_erts_pcre_stack_free; default_table = NULL; /* ISO8859-1 default, forced into pcre */ max_loop_limit = CONTEXT_REDS * LOOP_FACTOR; - - sys_memset((void *) &re_exec_trap_export, 0, sizeof(Export)); - re_exec_trap_export.address = &re_exec_trap_export.code[3]; - re_exec_trap_export.code[0] = am_erlang; - re_exec_trap_export.code[1] = am_re_run_trap; - re_exec_trap_export.code[2] = 3; - re_exec_trap_export.code[3] = (BeamInstr) em_apply_bif; - re_exec_trap_export.code[4] = (BeamInstr) &re_exec_trap; + + erts_init_trap_export(&re_exec_trap_export, am_erlang, am_re_run_trap, 3, + &re_exec_trap); grun_trap_exportp = erts_export_put(am_re,am_grun,3); urun_trap_exportp = erts_export_put(am_re,am_urun,3); |