2001-04-19 14:46:01 +00:00
|
|
|
|
/* Copyright (C) 1995,1996,1998,2000,2001 Free Software Foundation, Inc.
|
1996-07-25 22:56:11 +00:00
|
|
|
|
*
|
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
|
* any later version.
|
|
|
|
|
|
*
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
*
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
|
* along with this software; see the file COPYING. If not, write to
|
1997-05-26 22:34:48 +00:00
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
|
|
|
|
* Boston, MA 02111-1307 USA
|
1996-07-25 22:56:11 +00:00
|
|
|
|
*
|
|
|
|
|
|
* As a special exception, the Free Software Foundation gives permission
|
|
|
|
|
|
* for additional uses of the text contained in its release of GUILE.
|
|
|
|
|
|
*
|
|
|
|
|
|
* The exception is that, if you link the GUILE library with other files
|
|
|
|
|
|
* to produce an executable, this does not by itself cause the
|
|
|
|
|
|
* resulting executable to be covered by the GNU General Public License.
|
|
|
|
|
|
* Your use of that executable is in no way restricted on account of
|
|
|
|
|
|
* linking the GUILE library code into it.
|
|
|
|
|
|
*
|
|
|
|
|
|
* This exception does not however invalidate any other reasons why
|
|
|
|
|
|
* the executable file might be covered by the GNU General Public License.
|
|
|
|
|
|
*
|
|
|
|
|
|
* This exception applies only to the code released by the
|
|
|
|
|
|
* Free Software Foundation under the name GUILE. If you copy
|
|
|
|
|
|
* code from other Free Software Foundation releases into a copy of
|
|
|
|
|
|
* GUILE, as the General Public License permits, the exception does
|
|
|
|
|
|
* not apply to the code that you add in this way. To avoid misleading
|
|
|
|
|
|
* anyone as to the status of such modified files, you must delete
|
|
|
|
|
|
* this exception notice from them.
|
|
|
|
|
|
*
|
|
|
|
|
|
* If you write modifications of your own for GUILE, it is your choice
|
|
|
|
|
|
* whether to permit this exception to apply to your modifications.
|
1997-05-26 22:34:48 +00:00
|
|
|
|
* If you do not wish that, delete this exception notice. */
|
1999-12-12 02:36:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/_scm.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "libguile/alist.h"
|
|
|
|
|
|
#include "libguile/eval.h"
|
|
|
|
|
|
#include "libguile/procs.h"
|
|
|
|
|
|
#include "libguile/gsubr.h"
|
|
|
|
|
|
#include "libguile/objects.h"
|
2000-08-25 04:08:50 +00:00
|
|
|
|
#include "libguile/smob.h"
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/root.h"
|
|
|
|
|
|
#include "libguile/vectors.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "libguile/validate.h"
|
|
|
|
|
|
#include "libguile/procprop.h"
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
1999-03-12 08:17:50 +00:00
|
|
|
|
SCM_GLOBAL_SYMBOL (scm_sym_system_procedure, "system-procedure");
|
1998-05-04 11:32:58 +00:00
|
|
|
|
SCM_GLOBAL_SYMBOL (scm_sym_arity, "arity");
|
|
|
|
|
|
|
1998-11-26 07:44:35 +00:00
|
|
|
|
SCM
|
|
|
|
|
|
scm_i_procedure_arity (SCM proc)
|
1998-05-04 11:32:58 +00:00
|
|
|
|
{
|
|
|
|
|
|
int a = 0, o = 0, r = 0;
|
1998-11-26 07:44:35 +00:00
|
|
|
|
if (SCM_IMP (proc))
|
|
|
|
|
|
return SCM_BOOL_F;
|
1998-05-04 11:32:58 +00:00
|
|
|
|
loop:
|
|
|
|
|
|
switch (SCM_TYP7 (proc))
|
|
|
|
|
|
{
|
|
|
|
|
|
case scm_tc7_subr_1o:
|
|
|
|
|
|
o = 1;
|
|
|
|
|
|
case scm_tc7_subr_0:
|
|
|
|
|
|
break;
|
|
|
|
|
|
case scm_tc7_subr_2o:
|
|
|
|
|
|
o = 1;
|
|
|
|
|
|
case scm_tc7_subr_1:
|
|
|
|
|
|
case scm_tc7_cxr:
|
|
|
|
|
|
a += 1;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case scm_tc7_subr_2:
|
|
|
|
|
|
a += 2;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case scm_tc7_subr_3:
|
|
|
|
|
|
a += 3;
|
|
|
|
|
|
break;
|
|
|
|
|
|
case scm_tc7_asubr:
|
|
|
|
|
|
case scm_tc7_rpsubr:
|
|
|
|
|
|
case scm_tc7_lsubr:
|
|
|
|
|
|
r = 1;
|
1998-11-26 08:33:49 +00:00
|
|
|
|
break;
|
1998-05-04 11:32:58 +00:00
|
|
|
|
case scm_tc7_lsubr_2:
|
|
|
|
|
|
a += 2;
|
1998-11-26 08:33:49 +00:00
|
|
|
|
r = 1;
|
1998-05-04 11:32:58 +00:00
|
|
|
|
break;
|
2000-08-25 04:08:50 +00:00
|
|
|
|
case scm_tc7_smob:
|
2000-12-07 07:10:26 +00:00
|
|
|
|
if (SCM_SMOB_APPLICABLE_P (proc))
|
2000-12-04 17:19:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
int type = SCM_SMOB_DESCRIPTOR (proc).gsubr_type;
|
|
|
|
|
|
a += SCM_GSUBR_REQ (type);
|
|
|
|
|
|
o = SCM_GSUBR_OPT (type);
|
|
|
|
|
|
r = SCM_GSUBR_REST (type);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2000-08-25 04:08:50 +00:00
|
|
|
|
return SCM_BOOL_F;
|
2000-12-04 17:19:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
case scm_tc7_cclo:
|
|
|
|
|
|
if (SCM_EQ_P (SCM_CCLO_SUBR (proc), scm_f_gsubr_apply))
|
1998-05-04 11:32:58 +00:00
|
|
|
|
{
|
2000-12-04 17:19:35 +00:00
|
|
|
|
int type = SCM_INUM (SCM_GSUBR_TYPE (proc));
|
1998-11-26 07:44:35 +00:00
|
|
|
|
a += SCM_GSUBR_REQ (type);
|
1998-05-04 11:32:58 +00:00
|
|
|
|
o = SCM_GSUBR_OPT (type);
|
|
|
|
|
|
r = SCM_GSUBR_REST (type);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2000-12-04 17:19:35 +00:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
proc = SCM_CCLO_SUBR (proc);
|
|
|
|
|
|
a -= 1;
|
|
|
|
|
|
goto loop;
|
|
|
|
|
|
}
|
1999-03-11 11:47:22 +00:00
|
|
|
|
case scm_tc7_pws:
|
|
|
|
|
|
proc = SCM_PROCEDURE (proc);
|
|
|
|
|
|
goto loop;
|
1998-05-04 11:32:58 +00:00
|
|
|
|
case scm_tcs_closures:
|
2001-04-19 14:46:01 +00:00
|
|
|
|
proc = SCM_CLOSURE_FORMALS (proc);
|
|
|
|
|
|
if (SCM_NULLP (proc))
|
1998-05-04 11:32:58 +00:00
|
|
|
|
break;
|
1999-12-16 20:48:05 +00:00
|
|
|
|
while (SCM_CONSP (proc))
|
1998-05-04 11:32:58 +00:00
|
|
|
|
{
|
|
|
|
|
|
++a;
|
|
|
|
|
|
proc = SCM_CDR (proc);
|
|
|
|
|
|
}
|
2001-04-19 14:46:01 +00:00
|
|
|
|
if (!SCM_NULLP (proc))
|
1998-05-04 11:32:58 +00:00
|
|
|
|
r = 1;
|
|
|
|
|
|
break;
|
* tags.h: Update tag system docs.
(scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
(scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
(SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
or SCM_NCONSP, respectively.
* struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
* print.c (scm_iprin1): Remove printing of glocs. Do not try to
tell glocs from structs.
* gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
* eval.c (scm_m_atbind): Make a list of variables, not glocs.
(scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
instead of with glocs.
(EVALCAR): Do not test for glocs.
(scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
condition.
(scm_unmemocar): Do not handle glocs.
(scm_m_atfop): Memoize as a variable, not as a gloc.
(scm_eval_args, scm_deval_args): Do not handle glocs.
(scm_ceval, scm_deval): Likewise.
* eval.h (SCM_XEVALCAR): Do not test for glocs.
(SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
Removed.
* debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
* dynwind.c (scm_swap_bindings): Likewise.
(scm_dowinds): Updated to recognize lists of variables instead of
lists of glocs.
* __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
2001-07-26 21:40:18 +00:00
|
|
|
|
case scm_tcs_struct:
|
1999-08-29 03:27:18 +00:00
|
|
|
|
if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
|
|
|
|
|
|
{
|
|
|
|
|
|
r = 1;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (!SCM_I_OPERATORP (proc))
|
1998-11-26 07:44:35 +00:00
|
|
|
|
return SCM_BOOL_F;
|
1999-08-29 03:27:18 +00:00
|
|
|
|
proc = (SCM_I_ENTITYP (proc)
|
|
|
|
|
|
? SCM_ENTITY_PROCEDURE (proc)
|
|
|
|
|
|
: SCM_OPERATOR_PROCEDURE (proc));
|
|
|
|
|
|
a -= 1;
|
|
|
|
|
|
goto loop;
|
1998-11-26 07:44:35 +00:00
|
|
|
|
default:
|
|
|
|
|
|
return SCM_BOOL_F;
|
1998-05-04 11:32:58 +00:00
|
|
|
|
}
|
* list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
scm_list_n): New functions.
(SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
(lots of files): Use the new functions.
* goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
* strings.c: #include "libguile/deprecation.h".
2001-06-28 01:11:59 +00:00
|
|
|
|
return scm_list_3 (SCM_MAKINUM (a), SCM_MAKINUM (o), SCM_BOOL(r));
|
1998-05-04 11:32:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
static SCM
|
1999-12-12 02:36:16 +00:00
|
|
|
|
scm_stand_in_scm_proc(SCM proc)
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
SCM answer;
|
|
|
|
|
|
answer = scm_assoc (proc, scm_stand_in_procs);
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_FALSEP (answer))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
* list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
scm_list_n): New functions.
(SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
(lots of files): Use the new functions.
* goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
* strings.c: #include "libguile/deprecation.h".
2001-06-28 01:11:59 +00:00
|
|
|
|
answer = scm_closure (scm_list_2 (SCM_EOL, SCM_BOOL_F), SCM_EOL);
|
2001-03-11 09:44:08 +00:00
|
|
|
|
scm_stand_in_procs = scm_acons (proc, answer, scm_stand_in_procs);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
answer = SCM_CDR (answer);
|
|
|
|
|
|
return answer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_procedure_properties, "procedure-properties", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM proc),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Return @var{obj}'s property list.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_procedure_properties
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_PROC (1,proc);
|
1998-05-04 11:32:58 +00:00
|
|
|
|
return scm_acons (scm_sym_arity, scm_i_procedure_arity (proc),
|
1999-12-16 20:48:05 +00:00
|
|
|
|
SCM_PROCPROPS (SCM_CLOSUREP (proc)
|
1998-05-04 11:32:58 +00:00
|
|
|
|
? proc
|
|
|
|
|
|
: scm_stand_in_scm_proc (proc)));
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_set_procedure_properties_x, "set-procedure-properties!", 2, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM proc, SCM new_val),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Set @var{obj}'s property list to @var{alist}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_set_procedure_properties_x
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
1999-12-16 20:48:05 +00:00
|
|
|
|
if (!SCM_CLOSUREP (proc))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
proc = scm_stand_in_scm_proc(proc);
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_CLOSURE (1,proc);
|
* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:31:08 +00:00
|
|
|
|
SCM_SETPROCPROPS (proc, new_val);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return SCM_UNSPECIFIED;
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_procedure_property, "procedure-property", 2, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM p, SCM k),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"Return the property of @var{obj} with name @var{key}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_procedure_property
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
SCM assoc;
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_EQ_P (k, scm_sym_arity))
|
1998-11-26 07:44:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
SCM arity;
|
|
|
|
|
|
SCM_ASSERT (SCM_NFALSEP (arity = scm_i_procedure_arity (p)),
|
1999-12-12 02:36:16 +00:00
|
|
|
|
p, SCM_ARG1, FUNC_NAME);
|
1998-11-26 07:44:35 +00:00
|
|
|
|
return arity;
|
|
|
|
|
|
}
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_PROC (1,p);
|
1998-05-04 11:32:58 +00:00
|
|
|
|
assoc = scm_sloppy_assq (k,
|
1999-12-16 20:48:05 +00:00
|
|
|
|
SCM_PROCPROPS (SCM_CLOSUREP (p)
|
1998-05-04 11:32:58 +00:00
|
|
|
|
? p
|
|
|
|
|
|
: scm_stand_in_scm_proc (p)));
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return (SCM_NIMP (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_DEFINE (scm_set_procedure_property_x, "set-procedure-property!", 3, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
|
(SCM p, SCM k, SCM v),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
|
"In @var{obj}'s property list, set the property named @var{key} to\n"
|
|
|
|
|
|
"@var{value}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#define FUNC_NAME s_scm_set_procedure_property_x
|
1996-07-25 22:56:11 +00:00
|
|
|
|
{
|
|
|
|
|
|
SCM assoc;
|
1999-12-16 20:48:05 +00:00
|
|
|
|
if (!SCM_CLOSUREP (p))
|
1996-07-25 22:56:11 +00:00
|
|
|
|
p = scm_stand_in_scm_proc(p);
|
2000-01-05 19:25:37 +00:00
|
|
|
|
SCM_VALIDATE_CLOSURE (1,p);
|
2000-04-03 08:47:51 +00:00
|
|
|
|
if (SCM_EQ_P (k, scm_sym_arity))
|
1999-12-12 02:36:16 +00:00
|
|
|
|
SCM_MISC_ERROR ("arity is a read-only property", SCM_EOL);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
assoc = scm_sloppy_assq (k, SCM_PROCPROPS (p));
|
|
|
|
|
|
if (SCM_NIMP (assoc))
|
|
|
|
|
|
SCM_SETCDR (assoc, v);
|
|
|
|
|
|
else
|
* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:31:08 +00:00
|
|
|
|
SCM_SETPROCPROPS (p, scm_acons (k, v, SCM_PROCPROPS (p)));
|
1996-07-25 22:56:11 +00:00
|
|
|
|
return SCM_UNSPECIFIED;
|
|
|
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
|
#undef FUNC_NAME
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
1996-10-14 01:33:50 +00:00
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
void
|
|
|
|
|
|
scm_init_procprop ()
|
|
|
|
|
|
{
|
2000-04-21 14:16:44 +00:00
|
|
|
|
#include "libguile/procprop.x"
|
1996-07-25 22:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2000-03-19 19:01:16 +00:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
|
c-file-style: "gnu"
|
|
|
|
|
|
End:
|
|
|
|
|
|
*/
|