diff options
| author | Dmitry Antipov | 2013-02-08 09:28:52 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-02-08 09:28:52 +0400 |
| commit | 25721f5bb5681c22f666a0b4e61d94687d92a671 (patch) | |
| tree | 2ea496a25332f603727cc978192bc415c885c02a /src/alloc.c | |
| parent | 9a9d91d9c247adefa7137338d7609d81734f888d (diff) | |
| download | emacs-25721f5bb5681c22f666a0b4e61d94687d92a671.tar.gz emacs-25721f5bb5681c22f666a0b4e61d94687d92a671.zip | |
* lisp.h (make_uninit_vector): New function.
* alloc.c (Fvector, Fmake_byte_code):
* ccl.c (Fregister_ccl_program):
* charset.c (Fdefine_charset_internal, define_charset_internal):
* coding.c (make_subsidiaries, Fdefine_coding_system_internal):
* composite.c (syms_of_composite):
* font.c (Fquery_font, Ffont_info, syms_of_font):
* fontset.c (FONT_DEF_NEW, Fset_fontset_font):
* ftfont.c (ftfont_shape_by_flt):
* indent.c (recompute_width_table):
* nsselect.m (clean_local_selection_data):
* syntax.c (init_syntax_once):
* w32unsubscribe.c (uniscribe_shape):
* window.c (Fcurrent_window_configuration):
* xfaces.c (Fx_family_fonts):
* xselect.c (selection_data_to_lisp_data): Use it.
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); |