Commit Graph

6522 Commits

Author SHA1 Message Date
Jeroen van Rijn
d2d187eaaa Work around untyped nil 2025-06-08 22:53:52 +02:00
Tohei Ichikawa
7662e7d843 Removed obsolete tz param from gettimeofday 2025-06-08 16:07:11 -04:00
Tohei Ichikawa
876f1c02b7 Added missing parameter to gettimeofday 2025-06-08 12:47:50 -04:00
Jeroen van Rijn
77f4199af6 Simplify _xdg_user_dirs_lookup 2025-06-08 14:56:41 +02:00
Jeroen van Rijn
6d7f5baaf8 Merge pull request #5295 from elyalon/dirs
Fix user dirs, add docs
2025-06-07 11:13:40 +02:00
Ely Alon
deeb9e2d12 remove fmt import 2025-06-07 01:40:43 +03:00
Ely Alon
17746db555 Fix user dirs, add docs 2025-06-07 01:22:30 +03:00
Jeroen van Rijn
f1ce9f98d8 Re-add htonl and htons for those porting from C. 2025-06-06 13:13:34 +02:00
Jeroen van Rijn
4b36306674 Deprecate old @(deprecated) things. 2025-06-06 10:42:34 +02:00
Jeroen van Rijn
e870369c97 Merge pull request #5288 from Feoramund/strconv-append-to-write
Clarify `strconv.append_*` to `strconv.write_*`
2025-06-05 23:45:37 +02:00
Feoramund
2760f43ce7 Add deprecation warnings for strconv.append_* 2025-06-05 17:34:14 -04:00
Feoramund
153f7af594 Rename fixed.append to fixed.write too, for good measure 2025-06-05 16:56:29 -04:00
Feoramund
0049c62b26 Remove trailing whitespace 2025-06-05 16:56:01 -04:00
Feoramund
b7de15caa3 Clarify strconv.append_* to strconv.write_* 2025-06-05 16:56:00 -04:00
Jeroen van Rijn
108c8781c7 Factor out into helper. 2025-06-05 22:27:18 +02:00
Jeroen van Rijn
90a1b0ec4b UAF 2025-06-05 21:45:36 +02:00
Jeroen van Rijn
2428fa37a9 tabs 2025-06-05 21:38:59 +02:00
Ely Alon
a9cdb4f446 add more user dirs 2025-06-05 21:50:59 +03:00
Jeroen van Rijn
a1759aa2fa Fix 2025-06-05 16:54:39 +02:00
Jeroen van Rijn
93e1c6593e Change os2.user_* on Windows to use SHGetKnownFolderPath.
Known folders can be redirected using `SHSetKnownFolderPath`, and it's a bit iffy to rely on environment variables.

This also more easily allows us to add `user_*_dir` procedures for the remaining 139 GUIDs in `known_folders.odin`, provided they have equivalents on other platforms.
2025-06-05 16:37:41 +02:00
Jeroen van Rijn
da3b3a4139 Allocate return value on provided allocator 2025-06-05 15:16:35 +02:00
Laytan Laats
9eefa2006e encoding/cbor: support simd vectors 2025-06-04 22:00:02 +02:00
Laytan Laats
85224b21e6 encoding/cbor: support the matrix type 2025-06-04 21:51:12 +02:00
Jeroen van Rijn
ae5c92ac38 Enable odin check examples/all for JS. 2025-06-04 11:08:25 +02:00
Ben Ryan
cd417b0d1f Add windows bindings to support overlapped IO 2025-06-04 11:34:31 +10:00
Feoramund
8cde9dce47 Rewrite Atomic_RW_Mutex
This patch simplifies the implementation and fixes #5254.

Previously, the mutex was set up as if there could be multiple writers,
and there seemed to be some confusion as to which `Writer` bits to
check, as not all were checked or set at the same time.

This could also result in the mutex being left in a non-zero state even
after unlocking all locks.

All unneeded state has been removed and extra checks have been put in
place.
2025-06-03 09:07:38 -04:00
Jeroen van Rijn
d4a1670b93 Fix core:log on -target:js_wasm32 2025-06-02 14:44:26 +02:00
gingerBill
cd1f66e85c Merge pull request #5246 from RichardFevrier/master
Posix: Signal: add SIGWINCH support
2025-06-02 11:50:49 +01:00
Jeroen van Rijn
c705756389 Fix doctest 2025-05-31 20:35:25 +02:00
Jeroen van Rijn
890e923051 Vectorize strings.prefix_length.
Also add `strings.common_prefix`.
2025-05-31 20:24:21 +02:00
Richard Février
f27f9bcd33 Posix: Signal: add SIGWINCH support 2025-05-31 10:01:59 +02:00
Alexander Lunsford
edba218a7c Simplified function call to loadCstringDirect 2025-05-30 20:02:08 -05:00
Alexander Lunsford
9d223e178b Fix odin.js loadCstring to use pointer address correctly. 2025-05-30 19:50:34 -05:00
Jeroen van Rijn
3142aaf497 Merge pull request #4063 from Feoramund/simd-memory
Vectorize `base:runtime.memory_*`
2025-05-29 23:32:19 +02:00
Feoramund
45219f240e Rename SIMD_IS_EMULATED to capability-affirmative HAS_HARDWARE_SIMD 2025-05-29 17:17:51 -04:00
Feoramund
827a6f9045 Move simd.IS_EMULATED to runtime.SIMD_IS_EMULATED 2025-05-29 15:12:01 -04:00
Jeroen van Rijn
8597966a9f Fix rand.int_max comment 2025-05-28 11:50:24 +02:00
Zach Clark
78d83288a0 Add missing SEL _cmd argument to objc class_addMethod IMPs
When trying to grab the window pointer off the notification in a
windowDidBecomeKey implementation, I kept getting segfaults calling
notification->object(). The second argument of these needs to be a SEL.

https://developer.apple.com/documentation/objectivec/class_addmethod(_:_:_:_:)?language=objc#Discussion

I imagine existing code is getting by by setting the window information
in the delegate's context userdata, which works fine when you only have
one window as you can avoid needing to call notification->object(),
until you want one delegate assigned to two windows, hard to work around.
2025-05-27 17:04:19 -07:00
Wesley Kerfoot
cac18b4aba Fix incorrect CSV reader settings for example, fix typo in docs 2025-05-27 14:27:22 -04:00
Jeroen van Rijn
db5c45602d Remove outdated optimization attributes. 2025-05-27 17:57:06 +02:00
Jeroen van Rijn
0d55764aa7 int 2025-05-27 04:42:12 +02:00
Jeroen van Rijn
c513f035ad Fix example 2025-05-27 04:33:22 +02:00
Jeroen van Rijn
624c176ef3 ptr_sub prose clarification 2025-05-27 04:28:56 +02:00
Jeroen van Rijn
34edcf49ab Merge pull request #5222 from Badaxis/badaxis/Windows-Audio&Winmm
MAKEFOURCC: changed BYTE to byte
2025-05-26 22:56:00 +02:00
Vincent Billet
d98253564b MAKEFOURCC: changed BYTE to byte 2025-05-26 22:31:21 +02:00
Jeroen van Rijn
d156c2663a Merge pull request #5220 from Feoramund/fix-multiline-regex
Fix multiline RegEx iteration (breaking change for `.Multiline` usage)
2025-05-26 21:24:02 +02:00
Feoramund
35b157ac83 Fix multiline RegEx iteration
In `.Multiline` mode:

- `^` is now defined to assert the start of the string or that a "\n" or
  "\r" rune was parsed on last VM dispatch.

- `$` is now defined to consume a newline sequence of "\n", "\r", or
  "\r\n" or to assert the end of the string.
2025-05-26 14:48:45 -04:00
Laytan Laats
eac58fc640 sys/info: populate cpu.physical_cores and cpu.logical_cores on Darwin 2025-05-26 20:41:18 +02:00
Vincent Billet
9b7bb9290e HRESULT_FROM_WIN32 correction 2025-05-26 08:52:46 +02:00
Vincent Billet
bb274ab512 Merge branch 'odin-lang:master' into badaxis/Windows-Audio&Winmm 2025-05-26 08:16:45 +02:00