Deprecate old @(deprecated) things.

This commit is contained in:
Jeroen van Rijn
2025-06-06 10:42:34 +02:00
parent e870369c97
commit 4b36306674
6 changed files with 83 additions and 126 deletions
@@ -82,7 +82,6 @@ Application_setActivationPolicy :: proc "c" (self: ^Application, activationPolic
// NOTE: this is technically deprecated but still actively used (Sokol, glfw, SDL, etc.)
// and has no clear alternative although `activate` is what Apple tells you to use,
// that does not work the same way.
// @(deprecated="Use NSApplication method activate instead.")
@(objc_type=Application, objc_name="activateIgnoringOtherApps")
Application_activateIgnoringOtherApps :: proc "c" (self: ^Application, ignoreOtherApps: BOOL) {
msgSend(nil, self, "activateIgnoringOtherApps:", ignoreOtherApps)
-8
View File
@@ -75,14 +75,6 @@ LANGIDFROMLCID :: #force_inline proc "contextless" (lcid: LCID) -> LANGID {
return LANGID(lcid)
}
// this one gave me trouble as it do not mask the values.
// the _ in the name is also off comparing to the c code
// i can't find any usage in the odin repo
@(deprecated = "use MAKEWORD")
MAKE_WORD :: #force_inline proc "contextless" (x, y: WORD) -> WORD {
return x << 8 | y
}
utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
if len(s) < 1 {
return nil
-6
View File
@@ -242,10 +242,4 @@ foreign ws2_32 {
ntohl :: proc(netlong: c_ulong) -> c_ulong ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs)
ntohs :: proc(netshort: c_ushort) -> c_ushort ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htonl)
@(deprecated="Use endian specific integers instead, https://odin-lang.org/docs/overview/#basic-types")
htonl :: proc(hostlong: c_ulong) -> c_ulong ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htons)
@(deprecated="Use endian specific integers instead, https://odin-lang.org/docs/overview/#basic-types")
htons :: proc(hostshort: c_ushort) -> c_ushort ---
}