Mirror of the Vim source from https://github.com/vim/vim
Révision | d2a4f08396fe8c01ebca988db5eb95b7c3f9db8b (tree) |
---|---|
l'heure | 2006-04-30 07:03:41 |
Auteur | vimboss |
Commiter | vimboss |
updated for version 7.0f05
@@ -198,6 +198,9 @@ | ||
198 | 198 | */ |
199 | 199 | static hashtab_T func_hashtab; |
200 | 200 | |
201 | +/* The names of packages that once were loaded is remembered. */ | |
202 | +static garray_T ga_loaded = {0, 0, sizeof(char_u *), 4, NULL}; | |
203 | + | |
201 | 204 | /* list heads for garbage collection */ |
202 | 205 | static dict_T *first_dict = NULL; /* list of all dicts */ |
203 | 206 | static list_T *first_list = NULL; /* list of all lists */ |
@@ -807,6 +810,9 @@ | ||
807 | 810 | free_all_functions(); |
808 | 811 | hash_clear(&func_hashtab); |
809 | 812 | |
813 | + /* autoloaded script names */ | |
814 | + ga_clear_strings(&ga_loaded); | |
815 | + | |
810 | 816 | /* unreferenced lists and dicts */ |
811 | 817 | (void)garbage_collect(); |
812 | 818 | } |
@@ -19098,10 +19104,11 @@ | ||
19098 | 19104 | function_exists(name) |
19099 | 19105 | char_u *name; |
19100 | 19106 | { |
19101 | - char_u *p = name; | |
19107 | + char_u *nm = name; | |
19108 | + char_u *p; | |
19102 | 19109 | int n = FALSE; |
19103 | 19110 | |
19104 | - p = trans_function_name(&p, FALSE, TFN_INT|TFN_QUIET, NULL); | |
19111 | + p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET, NULL); | |
19105 | 19112 | if (p != NULL) |
19106 | 19113 | { |
19107 | 19114 | if (builtin_function(p)) |
@@ -19309,9 +19316,6 @@ | ||
19309 | 19316 | |
19310 | 19317 | #endif |
19311 | 19318 | |
19312 | -/* The names of packages that once were loaded is remembered. */ | |
19313 | -static garray_T ga_loaded = {0, 0, sizeof(char_u *), 4, NULL}; | |
19314 | - | |
19315 | 19319 | /* |
19316 | 19320 | * If "name" has a package name try autoloading the script for it. |
19317 | 19321 | * Return TRUE if a package was loaded. |