diff options
| author | Po Lu | 2022-06-22 18:37:32 +0800 |
|---|---|---|
| committer | Po Lu | 2022-06-22 18:37:41 +0800 |
| commit | 18d412a5138f21be77f36e4f8036971d576ef25e (patch) | |
| tree | 3e3b10b773e6450f93e21b05b69edca2929cf441 /src | |
| parent | f3c78c6ea7045734fa5e524d683d6cf6435b90bb (diff) | |
| download | emacs-18d412a5138f21be77f36e4f8036971d576ef25e.tar.gz emacs-18d412a5138f21be77f36e4f8036971d576ef25e.zip | |
Fix non-system-malloc build
* src/xterm.c (x_gc_free_ext_data_private): New function.
(x_gc_get_ext_data): Set it as the private data free function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 9e481c39af0..cfe329ab0f7 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4888,6 +4888,14 @@ x_update_opaque_region (struct frame *f, XEvent *configure) | |||
| 4888 | 4888 | ||
| 4889 | 4889 | ||
| 4890 | #if defined USE_CAIRO || defined HAVE_XRENDER | 4890 | #if defined USE_CAIRO || defined HAVE_XRENDER |
| 4891 | static int | ||
| 4892 | x_gc_free_ext_data_private (XExtData *extension) | ||
| 4893 | { | ||
| 4894 | xfree (extension->private_data); | ||
| 4895 | |||
| 4896 | return 0; | ||
| 4897 | } | ||
| 4898 | |||
| 4891 | static struct x_gc_ext_data * | 4899 | static struct x_gc_ext_data * |
| 4892 | x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) | 4900 | x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) |
| 4893 | { | 4901 | { |
| @@ -4907,6 +4915,7 @@ x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) | |||
| 4907 | ext_data = xzalloc (sizeof (*ext_data)); | 4915 | ext_data = xzalloc (sizeof (*ext_data)); |
| 4908 | ext_data->number = dpyinfo->ext_codes->extension; | 4916 | ext_data->number = dpyinfo->ext_codes->extension; |
| 4909 | ext_data->private_data = xzalloc (sizeof (struct x_gc_ext_data)); | 4917 | ext_data->private_data = xzalloc (sizeof (struct x_gc_ext_data)); |
| 4918 | ext_data->free_private = x_gc_free_ext_data_private; | ||
| 4910 | XAddToExtensionList (head, ext_data); | 4919 | XAddToExtensionList (head, ext_data); |
| 4911 | } | 4920 | } |
| 4912 | } | 4921 | } |