Commit a1c89c0a authored by Ken Raeburn's avatar Ken Raeburn
Browse files

* lread.c (Fload): Use SDATA, SSET.

parent bba772ab
...@@ -778,7 +778,7 @@ Return t if file exists. */) ...@@ -778,7 +778,7 @@ Return t if file exists. */)
Vloads_in_progress = Fcons (found, Vloads_in_progress); Vloads_in_progress = Fcons (found, Vloads_in_progress);
} }
if (!bcmp (&(SREF (found, SBYTES (found) - 4)), if (!bcmp (SDATA (found) + SBYTES (found) - 4,
".elc", 4)) ".elc", 4))
/* Load .elc files directly, but not when they are /* Load .elc files directly, but not when they are
remote and have no handler! */ remote and have no handler! */
...@@ -807,9 +807,9 @@ Return t if file exists. */) ...@@ -807,9 +807,9 @@ Return t if file exists. */)
fmode = "rb"; fmode = "rb";
#endif /* DOS_NT */ #endif /* DOS_NT */
stat ((char *)SDATA (efound), &s1); stat ((char *)SDATA (efound), &s1);
SREF (efound, SBYTES (efound) - 1) = 0; SSET (efound, SBYTES (efound) - 1, 0);
result = stat ((char *)SDATA (efound), &s2); result = stat ((char *)SDATA (efound), &s2);
SREF (efound, SBYTES (efound) - 1) = 'c'; SSET (efound, SBYTES (efound) - 1, 'c');
UNGCPRO; UNGCPRO;
if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment