1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 18:05:21 +00:00
mpv/osdep
der richter bc58361d86 mac: fix usage of temporary pointers
the pointer used to initialise the respective structs is only guaranteed
to be alive within this constructor. the struct itself is used later and
the data it points to, is not guaranteed to be the same.

to fix this we define a scope that pointer is definitely valid and use
it within this scope. a helper function was added to get the pointers
for several data at once. otherwise we would need to nest
withUnsafeMutableBytes several times, which would make it hard to read.
2021-01-13 16:23:47 +01:00
..
android
macos mac: fix usage of temporary pointers 2021-01-13 16:23:47 +01:00
win32
atomic.h
compiler.h
endian.h
getpid.h
glob-win.c
io.c win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
io.h win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
macOS_swift_bridge.h
macosx_application_objc.h
macosx_application.h mac: use visible frame rectangle for window geometry calculation 2020-12-19 21:37:55 +02:00
macosx_application.m mac: use visible frame rectangle for window geometry calculation 2020-12-19 21:37:55 +02:00
macosx_compat.h
macosx_events_objc.h
macosx_events.h
macosx_events.m
macosx_menubar_objc.h
macosx_menubar.h
macosx_menubar.m
macosx_touchbar.h
macosx_touchbar.m
macosx_versions.h
main-fn-cocoa.c
main-fn-unix.c
main-fn-win.c
main-fn.h
mpv.exe.manifest win32: request the UTF-8 code page for Windows APIs 2020-08-08 15:00:25 +03:00
mpv.rc
path-macosx.m
path-unix.c Revert "path: switch back to using non-XDG config dir by default" 2020-10-16 00:47:18 +03:00
path-uwp.c
path-win.c path: do not use old_home for win32 exe dir 2020-11-16 00:44:40 +02:00
path.h
polldev.c
polldev.h
semaphore_osx.c
semaphore.h
strnlen.h
subprocess-dummy.c
subprocess-posix.c command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
subprocess-win.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
subprocess.c
subprocess.h command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
terminal-dummy.c osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
terminal-unix.c terminal: process input when foregrounded 2020-11-26 23:55:59 +02:00
terminal-win.c osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
terminal.h osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
threads.c
threads.h
timer-darwin.c
timer-linux.c
timer-win2.c
timer.c
timer.h
w32_keyboard.c
w32_keyboard.h
win32-console-wrapper.c
windows_utils.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
windows_utils.h subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00