added GC_PROTECT

This commit is contained in:
marting 1999-11-04 20:10:28 +00:00
parent f81441cf2a
commit abc5901c5d
1 changed files with 4 additions and 2 deletions

View File

@ -58,6 +58,8 @@ int scheme_tcgetattrB(int fd, char *control_chars, s48_value scmvec)
{ {
struct termios t; struct termios t;
int result = tcgetattr(fd, &t); int result = tcgetattr(fd, &t);
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(scmvec);
// JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int); // JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int);
if (result != -1) { if (result != -1) {
@ -69,7 +71,7 @@ int scheme_tcgetattrB(int fd, char *control_chars, s48_value scmvec)
S48_VECTOR_SET(scmvec, 4, s48_enter_fixnum(cfgetispeed(&t))); S48_VECTOR_SET(scmvec, 4, s48_enter_fixnum(cfgetispeed(&t)));
S48_VECTOR_SET(scmvec, 5, s48_enter_fixnum(cfgetospeed(&t))); S48_VECTOR_SET(scmvec, 5, s48_enter_fixnum(cfgetospeed(&t)));
} }
S48_GC_UNPROTECT();
return result; return result;
} }