aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-02-09 17:21:28 +0100
committerBjörn Gustavsson <[email protected]>2010-03-10 14:25:21 +0100
commitc591f7b2a78b44ab321d0b99c100b349c8606c15 (patch)
tree492533e735efed799bb8ddd427594835bd41e142 /erts/emulator/beam/bif.c
parent64415f09de0691c2ccdf65df169a211b7917728b (diff)
downloadotp-c591f7b2a78b44ab321d0b99c100b349c8606c15.tar.gz
otp-c591f7b2a78b44ab321d0b99c100b349c8606c15.tar.bz2
otp-c591f7b2a78b44ab321d0b99c100b349c8606c15.zip
Make tracing and distribution work
Rewrite trace code and external coding. Also slightly correct the interface to the match-spec engine to make tracing work. That will make the test suites runnable.
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index c06d92ed45..85bf584337 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -3468,12 +3468,14 @@ BIF_RETTYPE make_fun_3(BIF_ALIST_3)
if (arity < 0) {
goto error;
}
- hp = HAlloc(BIF_P, 2);
- hp[0] = HEADER_EXPORT;
#if HALFWORD_HEAP
+ hp = HAlloc(BIF_P, 3);
+ hp[0] = HEADER_EXPORT;
/* Yes, May be misaligned, but X86_64 will fix it... */
- memcpy(hp+1,erts_export_get_or_make_stub(BIF_ARG_1, BIF_ARG_2, (Uint) arity),sizeof(Export *));
+ *((Export **) (hp+1)) = erts_export_get_or_make_stub(BIF_ARG_1, BIF_ARG_2, (Uint) arity);
#else
+ hp = HAlloc(BIF_P, 2);
+ hp[0] = HEADER_EXPORT;
hp[1] = (Eterm) erts_export_get_or_make_stub(BIF_ARG_1, BIF_ARG_2, (Uint) arity);
#endif
BIF_RET(make_export(hp));