diff --git a/src/object.c b/src/object.c index a3c9d31c6968034ea59d3c8a8cd062e6aa8f6ed7..d8266f8edb85eecf136d5e54cf637980fc1f0543 100644 --- a/src/object.c +++ b/src/object.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: object.c,v 1.12 1997/01/27 01:22:56 hubbe Exp $"); +RCSID("$Id: object.c,v 1.13 1997/02/07 01:33:03 hubbe Exp $"); #include "object.h" #include "dynamic_buffer.h" #include "interpret.h" @@ -33,7 +33,7 @@ void setup_fake_object() fake_object.refs=0xffffff; } -static struct object *low_clone(struct program *p) +struct object *low_clone(struct program *p) { int e; struct object *o; @@ -103,14 +103,18 @@ static struct object *low_clone(struct program *p) return o; } -struct object *clone(struct program *p, int args) +static void init_object(struct object *o, int args) { - struct object *o=low_clone(p); - apply_lfun(o,LFUN___INIT,0); pop_stack(); apply_lfun(o,LFUN_CREATE,args); pop_stack(); +} + +struct object *clone(struct program *p, int args) +{ + struct object *o=low_clone(p); + init_object(o,args); return o; } diff --git a/src/object.h b/src/object.h index bba376d0ff1317c7aee94ca7052b7476b0f7b6d0..18c3c55038c22506d4022f1e491b607e975b719d 100644 --- a/src/object.h +++ b/src/object.h @@ -38,6 +38,7 @@ extern struct program *master_program; /* Prototypes begin here */ void setup_fake_object(); +struct object *low_clone(struct program *p); struct object *clone(struct program *p, int args); struct object *get_master(); struct object *master();