diff options
| author | erco77 <erco@seriss.com> | 2020-08-01 14:35:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 14:35:44 -0700 |
| commit | 7abc09ad89b4c3d0c17ee8dc9d02ccd261cd13f2 (patch) | |
| tree | 72e461bac5930f8a319d48a6ea99ba793dd35a8b /src/Fl_cocoa.mm | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
| parent | e9688822ec68f066f425953278a853e049b93dfb (diff) | |
Merge pull request #116 from erco77/fl_strdup
fl_strdup() implemented + deployed
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 934dd2f78..50c658e8b 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -30,6 +30,7 @@ extern "C" { #include <FL/Fl_Printer.H> #include <FL/fl_draw.H> #include <FL/Fl_Rect.H> +#include <FL/fl_string.h> #include "drivers/Quartz/Fl_Quartz_Graphics_Driver.H" #include "drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H" #include "drivers/Cocoa/Fl_Cocoa_Screen_Driver.H" @@ -1587,7 +1588,7 @@ static void drain_dropped_files_list() { return; } NSString *s = (NSString*)[dropped_files_list objectAtIndex:0]; - char *fname = strdup([s UTF8String]); + char *fname = fl_strdup([s UTF8String]); [dropped_files_list removeObjectAtIndex:0]; if ([dropped_files_list count] == 0) { [dropped_files_list release]; @@ -3529,7 +3530,7 @@ static int get_plain_text_from_clipboard(int clipboard) [data length], [found isEqualToString:@"public.utf16-plain-text"] ? kCFStringEncodingUnicode : kCFStringEncodingMacRoman, false); - aux_c = strdup([auxstring UTF8String]); + aux_c = fl_strdup([auxstring UTF8String]); [auxstring release]; len = strlen(aux_c) + 1; } |
