FLTK logo

Re: [fltk/fltk] Segfault on Android (#143)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Segfault on Android (#143) Albrecht Schlosser Sep 23, 2020  
 

@erco77 Good catch!

Regarding the patches: I'd prefer patch no. 1 with one change: use char *strdup instead of char* strdup because this is - as I believe - the style used in the majority of the FLTK code. It's not in the CMP though AFAICT.

Regarding #if 0: This is (a) because the Android port is not yet ready or (b) because these specific implementations are (i.e. were) all using the default implementations in the base driver class. This is just the way the port is done: use the default if possible or as long as a specific implementation is not yet available, then switch to a specific implementation when needed and available. In the final version we'd likely remove the remaining not implemented methods, i.e. the entire #if 0 block.

In any case it's correct to move the (fl_)strdup implementation outside #if 0 because this it's now necessary to implement this for Android.

And it's also correct NOT to implement the default version as ::strdup() (patch 2) because - as you found out yourself - it would issue the warnings we wanted to avoid in the first place.

Great job, I suggest to commit this (modified patch no. 1). Thanks.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.