diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2624650ed2c..80086433e65 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3105,13 +3105,10 @@ Any number of arguments, even zero arguments, are allowed. | |||
| 3105 | usage: (vector &rest OBJECTS) */) | 3105 | usage: (vector &rest OBJECTS) */) |
| 3106 | (ptrdiff_t nargs, Lisp_Object *args) | 3106 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3107 | { | 3107 | { |
| 3108 | register Lisp_Object len, val; | ||
| 3109 | ptrdiff_t i; | 3108 | ptrdiff_t i; |
| 3110 | register struct Lisp_Vector *p; | 3109 | register Lisp_Object val = make_uninit_vector (nargs); |
| 3110 | register struct Lisp_Vector *p = XVECTOR (val); | ||
| 3111 | 3111 | ||
| 3112 | XSETFASTINT (len, nargs); | ||
| 3113 | val = Fmake_vector (len, Qnil); | ||
| 3114 | p = XVECTOR (val); | ||
| 3115 | for (i = 0; i < nargs; i++) | 3112 | for (i = 0; i < nargs; i++) |
| 3116 | p->contents[i] = args[i]; | 3113 | p->contents[i] = args[i]; |
| 3117 | return val; | 3114 | return val; |
| @@ -3149,9 +3146,9 @@ stack before executing the byte-code. | |||
| 3149 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) | 3146 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) |
| 3150 | (ptrdiff_t nargs, Lisp_Object *args) | 3147 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3151 | { | 3148 | { |
| 3152 | register Lisp_Object len, val; | ||
| 3153 | ptrdiff_t i; | 3149 | ptrdiff_t i; |
| 3154 | register struct Lisp_Vector *p; | 3150 | register Lisp_Object val = make_uninit_vector (nargs); |
| 3151 | register struct Lisp_Vector *p = XVECTOR (val); | ||
| 3155 | 3152 | ||
| 3156 | /* We used to purecopy everything here, if purify-flag was set. This worked | 3153 | /* We used to purecopy everything here, if purify-flag was set. This worked |
| 3157 | OK for Emacs-23, but with Emacs-24's lexical binding code, it can be | 3154 | OK for Emacs-23, but with Emacs-24's lexical binding code, it can be |
| @@ -3161,10 +3158,6 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT | |||
| 3161 | just wasteful and other times plainly wrong (e.g. those free vars may want | 3158 | just wasteful and other times plainly wrong (e.g. those free vars may want |
| 3162 | to be setcar'd). */ | 3159 | to be setcar'd). */ |
| 3163 | 3160 | ||
| 3164 | XSETFASTINT (len, nargs); | ||
| 3165 | val = Fmake_vector (len, Qnil); | ||
| 3166 | |||
| 3167 | p = XVECTOR (val); | ||
| 3168 | for (i = 0; i < nargs; i++) | 3161 | for (i = 0; i < nargs; i++) |
| 3169 | p->contents[i] = args[i]; | 3162 | p->contents[i] = args[i]; |
| 3170 | make_byte_code (p); | 3163 | make_byte_code (p); |