Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c04d9e70
Commit
c04d9e70
authored
Jul 20, 2005
by
Kim F. Storm
Browse files
(Fload, load_unwind): Use make_save_value to unwind
protect stream.
parent
ae643123
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/lread.c
src/lread.c
+4
-7
No files found.
src/lread.c
View file @
c04d9e70
...
...
@@ -674,7 +674,6 @@ Return t if file exists. */)
{
register
FILE
*
stream
;
register
int
fd
=
-
1
;
register
Lisp_Object
lispstream
;
int
count
=
SPECPDL_INDEX
();
Lisp_Object
temp
;
struct
gcpro
gcpro1
;
...
...
@@ -904,10 +903,7 @@ Return t if file exists. */)
}
GCPRO1
(
file
);
lispstream
=
Fcons
(
Qnil
,
Qnil
);
XSETCARFASTINT
(
lispstream
,
(
EMACS_UINT
)
stream
>>
16
);
XSETCDRFASTINT
(
lispstream
,
(
EMACS_UINT
)
stream
&
0xffff
);
record_unwind_protect
(
load_unwind
,
lispstream
);
record_unwind_protect
(
load_unwind
,
make_save_value
(
stream
,
0
));
record_unwind_protect
(
load_descriptor_unwind
,
load_descriptor_list
);
specbind
(
Qload_file_name
,
found
);
specbind
(
Qinhibit_file_name_operation
,
Qnil
);
...
...
@@ -960,8 +956,9 @@ static Lisp_Object
load_unwind
(
stream
)
/* used as unwind-protect function in load */
Lisp_Object
stream
;
{
fclose
((
FILE
*
)
(
XFASTINT
(
XCAR
(
stream
))
<<
16
|
XFASTINT
(
XCDR
(
stream
))));
struct
Lisp_Save_Value
*
p
=
XSAVE_VALUE
(
stream
);
fclose
((
FILE
*
)
p
->
pointer
);
if
(
--
load_in_progress
<
0
)
load_in_progress
=
0
;
return
Qnil
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment