diff options
| author | Kim F. Storm | 2004-11-29 15:35:15 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-29 15:35:15 +0000 |
| commit | 2ec7f67a91cc52b23058136d4bb915a0b3c6974e (patch) | |
| tree | 762216f01dca6a148cb38329a18df22e70186e3b /src | |
| parent | 0af8cfe11e13ba987555f12cee2ea3a4aa77cbd2 (diff) | |
| download | emacs-2ec7f67a91cc52b23058136d4bb915a0b3c6974e.tar.gz emacs-2ec7f67a91cc52b23058136d4bb915a0b3c6974e.zip | |
(concat): Use SAFE_ALLOCA.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -562,6 +562,7 @@ concat (nargs, args, target_type, last_special) | |||
| 562 | struct textprop_rec *textprops = NULL; | 562 | struct textprop_rec *textprops = NULL; |
| 563 | /* Number of elments in textprops. */ | 563 | /* Number of elments in textprops. */ |
| 564 | int num_textprops = 0; | 564 | int num_textprops = 0; |
| 565 | USE_SAFE_ALLOCA; | ||
| 565 | 566 | ||
| 566 | tail = Qnil; | 567 | tail = Qnil; |
| 567 | 568 | ||
| @@ -670,8 +671,7 @@ concat (nargs, args, target_type, last_special) | |||
| 670 | 671 | ||
| 671 | prev = Qnil; | 672 | prev = Qnil; |
| 672 | if (STRINGP (val)) | 673 | if (STRINGP (val)) |
| 673 | textprops | 674 | SAFE_ALLOCA (textprops, struct textprop_rec *, sizeof (struct textprop_rec) * nargs); |
| 674 | = (struct textprop_rec *) alloca (sizeof (struct textprop_rec) * nargs); | ||
| 675 | 675 | ||
| 676 | for (argnum = 0; argnum < nargs; argnum++) | 676 | for (argnum = 0; argnum < nargs; argnum++) |
| 677 | { | 677 | { |
| @@ -827,6 +827,8 @@ concat (nargs, args, target_type, last_special) | |||
| 827 | last_to_end = textprops[argnum].to + SCHARS (this); | 827 | last_to_end = textprops[argnum].to + SCHARS (this); |
| 828 | } | 828 | } |
| 829 | } | 829 | } |
| 830 | |||
| 831 | SAFE_FREE (); | ||
| 830 | return val; | 832 | return val; |
| 831 | } | 833 | } |
| 832 | 834 | ||