Allocate and initialize a user variable instance. @param namec Name of the variable. @return @retval Address of the allocated and initialized user_var_entry instance. @retval NULL on allocation error. */
| 3545 | @retval NULL on allocation error. |
| 3546 | */ |
| 3547 | static user_var_entry *create(const Name_string &name) |
| 3548 | { |
| 3549 | user_var_entry *entry; |
| 3550 | uint size= ALIGN_SIZE(sizeof(user_var_entry)) + |
| 3551 | (name.length() + 1) + extra_size; |
| 3552 | if (!(entry= (user_var_entry*) my_malloc(size, MYF(MY_WME | |
| 3553 | ME_FATALERROR)))) |
| 3554 | return NULL; |
| 3555 | entry->init(name); |
| 3556 | return entry; |
| 3557 | } |
| 3558 | |
| 3559 | /** |
| 3560 | Free all memory used by a user_var_entry instance |