diff options
| author | Paul Eggert | 2011-03-15 15:02:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-15 15:02:48 -0700 |
| commit | ae35e7564b5fc774798d5e9494123a2ff0522885 (patch) | |
| tree | e5d19b57de8a1f1172c588f9b1628c6140440289 /src/alloc.c | |
| parent | e5aab7e74931e4b4b0fd21abf4a6ea5b7f5134f4 (diff) | |
| download | emacs-ae35e7564b5fc774798d5e9494123a2ff0522885.tar.gz emacs-ae35e7564b5fc774798d5e9494123a2ff0522885.zip | |
* alloc.c: (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
Rename locals to avoid shadowing.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/alloc.c b/src/alloc.c index 1ad8af0d61a..6f379ef35f9 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2903,15 +2903,15 @@ See also the function `vector'. */) | |||
| 2903 | { | 2903 | { |
| 2904 | Lisp_Object vector; | 2904 | Lisp_Object vector; |
| 2905 | register EMACS_INT sizei; | 2905 | register EMACS_INT sizei; |
| 2906 | register EMACS_INT index; | 2906 | register EMACS_INT i; |
| 2907 | register struct Lisp_Vector *p; | 2907 | register struct Lisp_Vector *p; |
| 2908 | 2908 | ||
| 2909 | CHECK_NATNUM (length); | 2909 | CHECK_NATNUM (length); |
| 2910 | sizei = XFASTINT (length); | 2910 | sizei = XFASTINT (length); |
| 2911 | 2911 | ||
| 2912 | p = allocate_vector (sizei); | 2912 | p = allocate_vector (sizei); |
| 2913 | for (index = 0; index < sizei; index++) | 2913 | for (i = 0; i < sizei; i++) |
| 2914 | p->contents[index] = init; | 2914 | p->contents[i] = init; |
| 2915 | 2915 | ||
| 2916 | XSETVECTOR (vector, p); | 2916 | XSETVECTOR (vector, p); |
| 2917 | return vector; | 2917 | return vector; |
| @@ -2925,14 +2925,14 @@ usage: (vector &rest OBJECTS) */) | |||
| 2925 | (register int nargs, Lisp_Object *args) | 2925 | (register int nargs, Lisp_Object *args) |
| 2926 | { | 2926 | { |
| 2927 | register Lisp_Object len, val; | 2927 | register Lisp_Object len, val; |
| 2928 | register int index; | 2928 | register int i; |
| 2929 | register struct Lisp_Vector *p; | 2929 | register struct Lisp_Vector *p; |
| 2930 | 2930 | ||
| 2931 | XSETFASTINT (len, nargs); | 2931 | XSETFASTINT (len, nargs); |
| 2932 | val = Fmake_vector (len, Qnil); | 2932 | val = Fmake_vector (len, Qnil); |
| 2933 | p = XVECTOR (val); | 2933 | p = XVECTOR (val); |
| 2934 | for (index = 0; index < nargs; index++) | 2934 | for (i = 0; i < nargs; i++) |
| 2935 | p->contents[index] = args[index]; | 2935 | p->contents[i] = args[i]; |
| 2936 | return val; | 2936 | return val; |
| 2937 | } | 2937 | } |
| 2938 | 2938 | ||
| @@ -2947,7 +2947,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT | |||
| 2947 | (register int nargs, Lisp_Object *args) | 2947 | (register int nargs, Lisp_Object *args) |
| 2948 | { | 2948 | { |
| 2949 | register Lisp_Object len, val; | 2949 | register Lisp_Object len, val; |
| 2950 | register int index; | 2950 | register int i; |
| 2951 | register struct Lisp_Vector *p; | 2951 | register struct Lisp_Vector *p; |
| 2952 | 2952 | ||
| 2953 | XSETFASTINT (len, nargs); | 2953 | XSETFASTINT (len, nargs); |
| @@ -2965,11 +2965,11 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT | |||
| 2965 | args[1] = Fstring_as_unibyte (args[1]); | 2965 | args[1] = Fstring_as_unibyte (args[1]); |
| 2966 | 2966 | ||
| 2967 | p = XVECTOR (val); | 2967 | p = XVECTOR (val); |
| 2968 | for (index = 0; index < nargs; index++) | 2968 | for (i = 0; i < nargs; i++) |
| 2969 | { | 2969 | { |
| 2970 | if (!NILP (Vpurify_flag)) | 2970 | if (!NILP (Vpurify_flag)) |
| 2971 | args[index] = Fpurecopy (args[index]); | 2971 | args[i] = Fpurecopy (args[i]); |
| 2972 | p->contents[index] = args[index]; | 2972 | p->contents[i] = args[i]; |
| 2973 | } | 2973 | } |
| 2974 | XSETPVECTYPE (p, PVEC_COMPILED); | 2974 | XSETPVECTYPE (p, PVEC_COMPILED); |
| 2975 | XSETCOMPILED (val, p); | 2975 | XSETCOMPILED (val, p); |
| @@ -5063,18 +5063,18 @@ returns nil, because real GC can't be done. */) | |||
| 5063 | 5063 | ||
| 5064 | if (FLOATP (Vgc_cons_percentage)) | 5064 | if (FLOATP (Vgc_cons_percentage)) |
| 5065 | { /* Set gc_cons_combined_threshold. */ | 5065 | { /* Set gc_cons_combined_threshold. */ |
| 5066 | EMACS_INT total = 0; | 5066 | EMACS_INT tot = 0; |
| 5067 | 5067 | ||
| 5068 | total += total_conses * sizeof (struct Lisp_Cons); | 5068 | tot += total_conses * sizeof (struct Lisp_Cons); |
| 5069 | total += total_symbols * sizeof (struct Lisp_Symbol); | 5069 | tot += total_symbols * sizeof (struct Lisp_Symbol); |
| 5070 | total += total_markers * sizeof (union Lisp_Misc); | 5070 | tot += total_markers * sizeof (union Lisp_Misc); |
| 5071 | total += total_string_size; | 5071 | tot += total_string_size; |
| 5072 | total += total_vector_size * sizeof (Lisp_Object); | 5072 | tot += total_vector_size * sizeof (Lisp_Object); |
| 5073 | total += total_floats * sizeof (struct Lisp_Float); | 5073 | tot += total_floats * sizeof (struct Lisp_Float); |
| 5074 | total += total_intervals * sizeof (struct interval); | 5074 | tot += total_intervals * sizeof (struct interval); |
| 5075 | total += total_strings * sizeof (struct Lisp_String); | 5075 | tot += total_strings * sizeof (struct Lisp_String); |
| 5076 | 5076 | ||
| 5077 | gc_relative_threshold = total * XFLOAT_DATA (Vgc_cons_percentage); | 5077 | gc_relative_threshold = tot * XFLOAT_DATA (Vgc_cons_percentage); |
| 5078 | } | 5078 | } |
| 5079 | else | 5079 | else |
| 5080 | gc_relative_threshold = 0; | 5080 | gc_relative_threshold = 0; |
| @@ -5123,9 +5123,9 @@ returns nil, because real GC can't be done. */) | |||
| 5123 | 5123 | ||
| 5124 | if (!NILP (Vpost_gc_hook)) | 5124 | if (!NILP (Vpost_gc_hook)) |
| 5125 | { | 5125 | { |
| 5126 | int count = inhibit_garbage_collection (); | 5126 | int gc_count = inhibit_garbage_collection (); |
| 5127 | safe_run_hooks (Qpost_gc_hook); | 5127 | safe_run_hooks (Qpost_gc_hook); |
| 5128 | unbind_to (count, Qnil); | 5128 | unbind_to (gc_count, Qnil); |
| 5129 | } | 5129 | } |
| 5130 | 5130 | ||
| 5131 | /* Accumulate statistics. */ | 5131 | /* Accumulate statistics. */ |