comparison src/eval.c @ 855:d2a4f08396fe v7.0f05

updated for version 7.0f05
author vimboss
date Sat, 29 Apr 2006 22:03:41 +0000
parents db44f7b81373
children 8cd729851562
comparison
equal deleted inserted replaced
854:24b17b7badb1 855:d2a4f08396fe
195 195
196 /* 196 /*
197 * All user-defined functions are found in this hashtable. 197 * All user-defined functions are found in this hashtable.
198 */ 198 */
199 static hashtab_T func_hashtab; 199 static hashtab_T func_hashtab;
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};
200 203
201 /* list heads for garbage collection */ 204 /* list heads for garbage collection */
202 static dict_T *first_dict = NULL; /* list of all dicts */ 205 static dict_T *first_dict = NULL; /* list of all dicts */
203 static list_T *first_list = NULL; /* list of all lists */ 206 static list_T *first_list = NULL; /* list of all lists */
204 207
804 vars_clear(&globvarht); 807 vars_clear(&globvarht);
805 808
806 /* functions */ 809 /* functions */
807 free_all_functions(); 810 free_all_functions();
808 hash_clear(&func_hashtab); 811 hash_clear(&func_hashtab);
812
813 /* autoloaded script names */
814 ga_clear_strings(&ga_loaded);
809 815
810 /* unreferenced lists and dicts */ 816 /* unreferenced lists and dicts */
811 (void)garbage_collect(); 817 (void)garbage_collect();
812 } 818 }
813 #endif 819 #endif
19096 */ 19102 */
19097 static int 19103 static int
19098 function_exists(name) 19104 function_exists(name)
19099 char_u *name; 19105 char_u *name;
19100 { 19106 {
19101 char_u *p = name; 19107 char_u *nm = name;
19108 char_u *p;
19102 int n = FALSE; 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 if (p != NULL) 19112 if (p != NULL)
19106 { 19113 {
19107 if (builtin_function(p)) 19114 if (builtin_function(p))
19108 n = (find_internal_func(p) >= 0); 19115 n = (find_internal_func(p) >= 0);
19109 else 19116 else
19306 p2 = *(ufunc_T **)s2; 19313 p2 = *(ufunc_T **)s2;
19307 return profile_cmp(&p1->uf_tm_self, &p2->uf_tm_self); 19314 return profile_cmp(&p1->uf_tm_self, &p2->uf_tm_self);
19308 } 19315 }
19309 19316
19310 #endif 19317 #endif
19311
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 19318
19315 /* 19319 /*
19316 * If "name" has a package name try autoloading the script for it. 19320 * If "name" has a package name try autoloading the script for it.
19317 * Return TRUE if a package was loaded. 19321 * Return TRUE if a package was loaded.
19318 */ 19322 */