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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
a56eaaef
Commit
a56eaaef
authored
Nov 06, 2009
by
Dan Nicolaescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* alloc.c (make_pure_c_string): New function.
* eval.c (Fautoload): Purecopy all arguments.
parent
1e8780b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
src/ChangeLog
src/ChangeLog
+6
-0
src/alloc.c
src/alloc.c
+18
-0
src/eval.c
src/eval.c
+6
-9
No files found.
src/ChangeLog
View file @
a56eaaef
2009-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
* alloc.c (make_pure_c_string): New function.
* eval.c (Fautoload): Purecopy all arguments.
2009-11-05 Kenichi Handa <handa@m17n.org>
* fileio.c (Finsert_file_contents): Be sure set coding-system of
...
...
src/alloc.c
View file @
a56eaaef
...
...
@@ -4821,6 +4821,24 @@ make_pure_string (data, nchars, nbytes, multibyte)
return
string
;
}
/* Return a string a string allocated in pure space. Do not allocate
the string data, just point to DATA. */
Lisp_Object
make_pure_c_string
(
const
char
*
data
)
{
Lisp_Object
string
;
struct
Lisp_String
*
s
;
int
nchars
=
strlen
(
data
);
s
=
(
struct
Lisp_String
*
)
pure_alloc
(
sizeof
*
s
,
Lisp_String
);
s
->
size
=
nchars
;
s
->
size_byte
=
-
1
;
s
->
data
=
data
;
s
->
intervals
=
NULL_INTERVAL
;
XSETSTRING
(
string
,
s
);
return
string
;
}
/* Return a cons allocated from pure space. Give it pure copies
of CAR as car and CDR as cdr. */
...
...
src/eval.c
View file @
a56eaaef
...
...
@@ -2127,16 +2127,13 @@ this does nothing and returns nil. */)
/* Only add entries after dumping, because the ones before are
not useful and else we get loads of them from the loaddefs.el. */
LOADHIST_ATTACH
(
Fcons
(
Qautoload
,
function
));
if
(
NILP
(
Vpurify_flag
))
args
[
0
]
=
file
;
else
args
[
0
]
=
Fpurecopy
(
file
);
args
[
1
]
=
docstring
;
args
[
2
]
=
interactive
;
args
[
3
]
=
type
;
return
Ffset
(
function
,
Fcons
(
Qautoload
,
Flist
(
4
,
&
args
[
0
]
)));
/* We don't want the docstring in purespace (instead,
Snarf-documentation should (hopefully) overwrite it). */
docstring
=
make_number
(
0
)
;
return
Ffset
(
function
,
Fpurecopy
(
list5
(
Qautoload
,
file
,
docstring
,
interactive
,
type
)));
}
Lisp_Object
...
...
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