mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Fix some typing issues wrt SCM/scm_bits_t.
This commit is contained in:
parent
fbd485ba49
commit
843524cc20
5 changed files with 37 additions and 17 deletions
|
@ -1,3 +1,21 @@
|
|||
2000-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* arbiters.c (scm_make_arbiter), async.c (scm_async), dynwind.c
|
||||
(scm_internal_dynamic_wind): Smob data is always of type
|
||||
scm_bits_t.
|
||||
|
||||
* arbiters.c (SCM_ARB_LOCKED, SCM_LOCK_ARB, SCM_UNLOCK_ARB):
|
||||
Access the locking information in cell entry 0 with
|
||||
SCM_{SET_}?CELL_WORD_0 instead of SCM_*CAR.
|
||||
|
||||
* async.c (scm_run_asyncs): Use SCM_NULLP to test for the empty
|
||||
list.
|
||||
|
||||
* dynwind.c (scm_dowinds): Use SCM_EQ_P to compare SCM values.
|
||||
|
||||
* ports.h (SCM_PTAB_ENTRY, SCM_SETPTAB_ENTRY): Access the ptab
|
||||
entry data using SCM_{SET_}?CELL_WORD_1 instead of SCM_{SET}?CDR.
|
||||
|
||||
2000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* alist.c (scm_sloppy_assq, scm_assq), eq.c (scm_eq_p, scm_eqv_p,
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
static long scm_tc16_arbiter;
|
||||
|
||||
|
||||
#define SCM_ARB_LOCKED(arb) ((SCM_UNPACK_CAR (arb)) & (1L << 16))
|
||||
#define SCM_LOCK_ARB(arb) SCM_SETCAR (arb, (SCM) (scm_tc16_arbiter | (1L << 16)));
|
||||
#define SCM_UNLOCK_ARB(arb) SCM_SETCAR (arb, (SCM) scm_tc16_arbiter);
|
||||
#define SCM_ARB_LOCKED(arb) ((SCM_CELL_WORD_0 (arb)) & (1L << 16))
|
||||
#define SCM_LOCK_ARB(arb) (SCM_SET_CELL_WORD_0 ((arb), scm_tc16_arbiter | (1L << 16)));
|
||||
#define SCM_UNLOCK_ARB(arb) (SCM_SET_CELL_WORD_0 ((arb), scm_tc16_arbiter));
|
||||
|
||||
static int
|
||||
prinarb (SCM exp, SCM port, scm_print_state *pstate)
|
||||
|
@ -84,7 +84,7 @@ SCM_DEFINE (scm_make_arbiter, "make-arbiter", 1, 0, 0,
|
|||
"Arbiters are a way to achieve process synchronization.")
|
||||
#define FUNC_NAME s_scm_make_arbiter
|
||||
{
|
||||
SCM_RETURN_NEWSMOB (scm_tc16_arbiter, name);
|
||||
SCM_RETURN_NEWSMOB (scm_tc16_arbiter, SCM_UNPACK (name));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ SCM_DEFINE (scm_async, "async", 1, 0, 0,
|
|||
"")
|
||||
#define FUNC_NAME s_scm_async
|
||||
{
|
||||
SCM_RETURN_NEWSMOB2 (scm_tc16_async, 0, thunk);
|
||||
SCM_RETURN_NEWSMOB2 (scm_tc16_async, 0, SCM_UNPACK (thunk));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -368,7 +368,7 @@ SCM_DEFINE (scm_run_asyncs, "run-asyncs", 1, 0, 0,
|
|||
#else
|
||||
scm_asyncs_pending_p = 0;
|
||||
#endif
|
||||
while (list_of_a != SCM_EOL)
|
||||
while (! SCM_NULLP (list_of_a))
|
||||
{
|
||||
SCM a;
|
||||
struct scm_async * it;
|
||||
|
|
|
@ -160,7 +160,8 @@ scm_internal_dynamic_wind (scm_guard_t before,
|
|||
{
|
||||
SCM guards, ans;
|
||||
before (guard_data);
|
||||
SCM_NEWSMOB3 (guards, tc16_guards, before, after, guard_data);
|
||||
SCM_NEWSMOB3 (guards, tc16_guards, (scm_bits_t) before,
|
||||
(scm_bits_t) after, (scm_bits_t) guard_data);
|
||||
scm_dynwinds = scm_acons (guards, SCM_BOOL_F, scm_dynwinds);
|
||||
ans = inner (inner_data);
|
||||
scm_dynwinds = SCM_CDR (scm_dynwinds);
|
||||
|
@ -198,7 +199,7 @@ void
|
|||
scm_dowinds (SCM to, long delta)
|
||||
{
|
||||
tail:
|
||||
if (scm_dynwinds == to);
|
||||
if (SCM_EQ_P (to, scm_dynwinds));
|
||||
else if (0 > delta)
|
||||
{
|
||||
SCM wind_elt;
|
||||
|
|
|
@ -161,15 +161,16 @@ extern int scm_port_table_size; /* Number of ports in scm_port_table. */
|
|||
#define SCM_OUTPORTP(x) (SCM_NIMP(x) && (((0x7f | SCM_WRTNG) & SCM_UNPACK_CAR(x))==(scm_tc7_port | SCM_WRTNG)))
|
||||
#define SCM_OPENP(x) (SCM_NIMP(x) && (SCM_OPN & SCM_UNPACK_CAR (x)))
|
||||
#define SCM_CLOSEDP(x) (!SCM_OPENP(x))
|
||||
#define SCM_PTAB_ENTRY(x) ((scm_port *) SCM_CDR(x))
|
||||
#define SCM_SETPTAB_ENTRY(x,ent) SCM_SETCDR ((x), (SCM)(ent))
|
||||
#define SCM_STREAM(x) SCM_PTAB_ENTRY(x)->stream
|
||||
#define SCM_SETSTREAM(x,s) (SCM_PTAB_ENTRY(x)->stream = (SCM) s)
|
||||
#define SCM_FILENAME(x) SCM_PTAB_ENTRY(x)->file_name
|
||||
#define SCM_LINUM(x) SCM_PTAB_ENTRY(x)->line_number
|
||||
#define SCM_COL(x) SCM_PTAB_ENTRY(x)->column_number
|
||||
#define SCM_REVEALED(x) SCM_PTAB_ENTRY(x)->revealed
|
||||
#define SCM_SETREVEALED(x,s) (SCM_PTAB_ENTRY(x)->revealed = s)
|
||||
|
||||
#define SCM_PTAB_ENTRY(x) ((scm_port *) SCM_CELL_WORD_1 (x))
|
||||
#define SCM_SETPTAB_ENTRY(x,ent) (SCM_SET_CELL_WORD_1 ((x), (ent)))
|
||||
#define SCM_STREAM(x) (SCM_PTAB_ENTRY(x)->stream)
|
||||
#define SCM_SETSTREAM(x,s) (SCM_PTAB_ENTRY(x)->stream = (SCM) (s))
|
||||
#define SCM_FILENAME(x) (SCM_PTAB_ENTRY(x)->file_name)
|
||||
#define SCM_LINUM(x) (SCM_PTAB_ENTRY(x)->line_number)
|
||||
#define SCM_COL(x) (SCM_PTAB_ENTRY(x)->column_number)
|
||||
#define SCM_REVEALED(x) (SCM_PTAB_ENTRY(x)->revealed)
|
||||
#define SCM_SETREVEALED(x,s) (SCM_PTAB_ENTRY(x)->revealed = (s))
|
||||
|
||||
#define SCM_INCLINE(port) {SCM_LINUM (port) += 1; SCM_COL (port) = 0;}
|
||||
#define SCM_INCCOL(port) {SCM_COL (port) += 1;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue