mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 12:30:32 +02:00
* tags.h (SCM_ECONSP, SCM_NECONSP): Fix these macros to have the
SCM_NIMP test integrated into an || clause that I'd missed before and was causing a segfault in the regression tests. * symbols.h (SCM_ROUCHARS): Make cast be to (unsigned char *), not (char *); fixes a problem reported by the regression test ports.test. * ports.c: Fixed a couple of arg/number mismatches in SCM_VALIDATE_ macros. Now passes the (not-comprehensive) guile-modules test-suite again!
This commit is contained in:
parent
f172c0b71d
commit
cfaba30ebd
3 changed files with 6 additions and 6 deletions
|
@ -977,7 +977,7 @@ not supplied, the current input port is used.")
|
||||||
if (SCM_UNBNDP (port))
|
if (SCM_UNBNDP (port))
|
||||||
port = scm_cur_inp;
|
port = scm_cur_inp;
|
||||||
else
|
else
|
||||||
SCM_VALIDATE_OPINPORT(1,port);
|
SCM_VALIDATE_OPINPORT(2,port);
|
||||||
|
|
||||||
c = SCM_ICHR (cobj);
|
c = SCM_ICHR (cobj);
|
||||||
|
|
||||||
|
@ -998,7 +998,7 @@ unread characters will be read again in last-in first-out order. If
|
||||||
if (SCM_UNBNDP (port))
|
if (SCM_UNBNDP (port))
|
||||||
port = scm_cur_inp;
|
port = scm_cur_inp;
|
||||||
else
|
else
|
||||||
SCM_VALIDATE_OPINPORT(1,port);
|
SCM_VALIDATE_OPINPORT(2,port);
|
||||||
|
|
||||||
scm_ungets (SCM_ROUCHARS (str), SCM_LENGTH (str), port);
|
scm_ungets (SCM_ROUCHARS (str), SCM_LENGTH (str), port);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ extern int scm_symhash_dim;
|
||||||
#define SCM_ROCHARS(x) ((char *)((SCM_TYP7(x) == scm_tc7_substring) \
|
#define SCM_ROCHARS(x) ((char *)((SCM_TYP7(x) == scm_tc7_substring) \
|
||||||
? SCM_INUM (SCM_CADR (x)) + SCM_CHARS (SCM_CDDR (x)) \
|
? SCM_INUM (SCM_CADR (x)) + SCM_CHARS (SCM_CDDR (x)) \
|
||||||
: SCM_CHARS (x)))
|
: SCM_CHARS (x)))
|
||||||
#define SCM_ROUCHARS(x) ((char *) ((SCM_TYP7(x) == scm_tc7_substring) \
|
#define SCM_ROUCHARS(x) ((unsigned char *) ((SCM_TYP7(x) == scm_tc7_substring) \
|
||||||
? SCM_INUM (SCM_CADR (x)) + SCM_UCHARS (SCM_CDDR (x))\
|
? SCM_INUM (SCM_CADR (x)) + SCM_UCHARS (SCM_CDDR (x))\
|
||||||
: SCM_UCHARS (x)))
|
: SCM_UCHARS (x)))
|
||||||
#define SCM_ROLENGTH(x) SCM_LENGTH (x)
|
#define SCM_ROLENGTH(x) SCM_LENGTH (x)
|
||||||
|
|
|
@ -272,11 +272,11 @@ typedef long SCM;
|
||||||
* can be expected to occur.
|
* can be expected to occur.
|
||||||
*/
|
*/
|
||||||
#define SCM_ECONSP(x) (SCM_CONSP (x) \
|
#define SCM_ECONSP(x) (SCM_CONSP (x) \
|
||||||
|| (SCM_TYP3(x) == 1 \
|
|| SCM_NIMP(x) && ((SCM_TYP3(x) == 1 \
|
||||||
&& SCM_CDR (SCM_CAR (x) - 1) != 0))
|
&& SCM_CDR (SCM_CAR (x) - 1) != 0)))
|
||||||
#define SCM_NECONSP(x) (SCM_NCONSP(x) \
|
#define SCM_NECONSP(x) (SCM_NCONSP(x) \
|
||||||
&& (SCM_TYP3(x) != 1 \
|
&& (SCM_TYP3(x) != 1 \
|
||||||
|| SCM_CDR (SCM_CAR (x) - 1) == 0))
|
|| (SCM_NIMP(x) && SCM_CDR (SCM_CAR (x) - 1) == 0)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue