1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

* Removed unused member "documentation" from struct scm_subr_entry.

* Eliminate use of scm_intern0/scm_sysintern0 in procs.c.
This commit is contained in:
Dirk Herrmann 2000-12-22 16:46:17 +00:00
parent 2e9c835db9
commit c9c01b1125
5 changed files with 35 additions and 9 deletions

2
NEWS
View file

@ -308,7 +308,7 @@ SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR
SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
Use scm_memory_error instead of SCM_NALLOC.

View file

@ -52,7 +52,8 @@ In release 1.6:
SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING,
SCM_ROCHARS, SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX,
SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR
SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR,
SCM_SUBR_DOC
- remove scm_vector_set_length_x
- remove function scm_call_catching_errors
(replaced by catch functions from throw.[ch])

View file

@ -1,3 +1,17 @@
2000-12-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
* procs.h (scm_subr_entry): Removed unused struct member
"documentation".
(SCM_SUBR_DOC): Deprecated.
* procs.c (scm_make_subr_opt): Eliminate use of scm_intern0 in
favor of scm_str2symbol. Similarly, prefer scm_sysintern over
scm_sysintern0.
(scm_make_subr_opt, scm_mark_subr_table): Struct scm_subr_entry
does not have a member "documentation" any more.
2000-12-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (restore_environment): Make sure that changes to the

View file

@ -70,6 +70,7 @@ int scm_subr_table_room = 750;
SCM
scm_make_subr_opt (const char *name, int type, SCM (*fcn) (), int set)
{
SCM symbol;
SCM symcell;
register SCM z;
int entry;
@ -87,14 +88,21 @@ scm_make_subr_opt (const char *name, int type, SCM (*fcn) (), int set)
}
SCM_NEWCELL (z);
symcell = set ? scm_sysintern0 (name) : scm_intern0 (name);
if (set)
{
symcell = scm_sysintern (name, SCM_UNDEFINED);
symbol = SCM_CAR (symcell);
}
else
{
symbol = scm_str2symbol (name);
}
entry = scm_subr_table_size;
scm_subr_table[entry].handle = z;
scm_subr_table[entry].name = SCM_CAR (symcell);
scm_subr_table[entry].name = symbol;
scm_subr_table[entry].generic = 0;
scm_subr_table[entry].properties = SCM_EOL;
scm_subr_table[entry].documentation = SCM_BOOL_F;
SCM_SET_SUBRF (z, fcn);
SCM_SET_CELL_TYPE (z, (entry << 8) + type);
@ -143,8 +151,6 @@ scm_mark_subr_table ()
scm_gc_mark (*scm_subr_table[i].generic);
if (SCM_NIMP (scm_subr_table[i].properties))
scm_gc_mark (scm_subr_table[i].properties);
if (SCM_NIMP (scm_subr_table[i].documentation))
scm_gc_mark (scm_subr_table[i].documentation);
}
}

View file

@ -63,7 +63,6 @@ typedef struct
* *generic == 0 until first method
*/
SCM properties; /* procedure properties */
SCM documentation;
} scm_subr_entry;
#define SCM_SUBRNUM(subr) (SCM_CELL_WORD_0 (subr) >> 8)
@ -88,7 +87,6 @@ typedef struct
#define SCM_SUBR_GENERIC(x) (SCM_SUBR_ENTRY (x).generic)
#define SCM_SUBR_PROPS(x) (SCM_SUBR_ENTRY (x).properties)
#define SCM_SUBR_DOC(x) (SCM_SUBR_ENTRY (x).documentation)
/* Closures
*/
@ -190,6 +188,13 @@ extern SCM scm_make_cclo (SCM proc, SCM len);
#endif /*GUILE_DEBUG*/
#if (SCM_DEBUG_DEPRECATED == 0)
#define SCM_SUBR_DOC(x) SCM_BOOL_F
#endif /* SCM_DEBUG_DEPRECATED == 0 */
#endif /* PROCSH */
/*