From 5207bb2acb40529edad76ac63e53cb3782508c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 6 Feb 1997 17:33:22 -0800 Subject: [PATCH] new function: low_clone() Rev: src/object.c:1.13 Rev: src/object.h:1.8 --- src/object.c | 14 +++++++++----- src/object.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/object.c b/src/object.c index a3c9d31c69..d8266f8edb 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 bba376d0ff..18c3c55038 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(); -- GitLab