Laytan Laats and flysand7
c08408ea08
fix thread_unix for Darwin after pthread corrections in posix package
...
afed3ce removed the sys/unix package and moved over to sys/posix, it has
new bindings for the pthread APIs but should have been equivalent (not).
8fb7182 used `CANCEL_ENABLE :: 0`, `CANCEL_DISABLE :: 1`, `CANCEL_DEFERRED :: 0`, `CANCEL_ASYNCHRONOUS :: 1` for Darwin, while the
correct values are `1`, `0`, `2` and `0` respectively (same mistake was made for
FreeBSD in that commit).
What this meant is that the
`pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)` was not actually
successful, but because the error wasn't checked it was assumed it was.
It also meant `pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)` would
actually be setting `PTHREAD_CANCEL_DISABLE`.
The code in this PR restores the behaviour by now actually deliberately
setting `PTHREAD_CANCEL_DISABLE` and not setting
`PTHREAD_CANCEL_ASYNCHRONOUS` which was the previous behaviour that does
actually seem to work for some reason.
(I also fixed an issue in fmt where `x` would use uppercase if it was a
pointer.)
2024-12-01 11:54:52 +11:00
Laytan and flysand7
78dc4d4907
fix test
2024-12-01 11:54:51 +11:00
Laytan and flysand7
9f1c894f1f
port pthread_mutex_t and pthread_cond_t from sys/unix cause miniaudio wants it
2024-12-01 11:54:51 +11:00
Laytan and flysand7
f342215b4d
clean up dynlib and path/filepath with sys/posix
2024-12-01 11:54:51 +11:00
Laytan and flysand7
2b5f0fc729
remove pthread from sys/unix and use sys/posix where used
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
49ddbd9b99
sys/posix: impl rest of linux, impl some of Windows
2024-12-01 11:54:51 +11:00
Karl Zylinski and flysand7
879771fe32
Fix for using utf8string.at with last rune index returning wrong rune.
2024-12-01 11:54:51 +11:00
Alexis Caraballo and flysand7
d9326ae93d
fix cbor.to_json always returning array of tuples for objects
...
to_json uses a small proc to check if all keys of an object are strings.
It was always returning false for any input.
2024-12-01 11:54:51 +11:00
Jeroen van Rijn and flysand7
1df246664f
Fix image.which_bytes
...
Invert test in `which_bytes` to fix Softimage PIC detection. Fixes #4429 .
2024-12-01 11:54:51 +11:00
Laytan and flysand7
5faefac106
math/rand: choice_bit_set return not_empty -> ok
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
d85f18e898
math/rand: add choice_bit_set
2024-12-01 11:54:51 +11:00
Patric Dexheimer and flysand7
12cfc9b8de
Update process_windows.odin
...
Mistype
2024-12-01 11:54:51 +11:00
IllusionMan1212 and flysand7
fafb2b1e75
core/io: correctly escape runes greater than 0xFFFF
2024-12-01 11:54:51 +11:00
gingerBill and flysand7
e6a4f3048f
Fix possible leak in recursive filepath.glob
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
d185ab5991
sys/wasm/js: add set_element_style
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
3740497e42
encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
4207d4fded
encoding/cbor: handle binary having more fields than the struct by discarding
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
0d4d3bd1de
math/rand: support non-contiguous enums in choice_enum
2024-12-01 11:54:51 +11:00
Laytan Laats and flysand7
0c470895b3
image: add panic when load is called without any registered loaders
2024-12-01 11:54:50 +11:00
Lucas Perlind and flysand7
fc3ea5b3d9
core/unicode/utf16: add rune_count proc
...
This returns the number of runes in a u16 slice
2024-12-01 11:54:50 +11:00
Misomosi and flysand7
b459cb6b2c
Fix magnitude check in parse_f64_prefix
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
79975efb7e
add better comment about freebsd hacks
2024-12-01 11:54:50 +11:00
f7fffc4b27
Update core/time/timezone/tzdate.odin
...
Co-authored-by: Feoramund <161657516+Feoramund@users.noreply.github.com >
2024-12-01 11:54:50 +11:00
e4983831de
Update core/time/timezone/tzdate.odin
...
Co-authored-by: Feoramund <161657516+Feoramund@users.noreply.github.com >
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
f2711dca7f
add julian day rule resolvers
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
83932280f8
swap datetime_to_str to aprintf
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
0ed3d459f7
delete local_str with the appropriate allocator
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
e8b6652aba
sort out windows enum names too
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
8875921ec7
tweaks per laytan suggestions
2024-12-01 11:54:50 +11:00
Colin Davidson and flysand7
fc9983e9c8
Initial cut of timezones
2024-12-01 11:54:50 +11:00
Tom Solberg and flysand7
b7e61095a9
cbor: fix capacity and ptr calculation for dynarray unmarshal
2024-12-01 11:54:50 +11:00
Laytan Laats and flysand7
357f463372
odin/parser: fix offsets of value declarations
...
Fixes #4356
2024-12-01 11:54:50 +11:00
IllusionMan1212 and flysand7
1f2875e939
fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint
2024-12-01 11:54:50 +11:00
Laytan Laats and flysand7
f56ac466c3
encoding/json: fix leak when string is unmarshalled into non-string field
...
Fixes #4391
2024-12-01 11:54:50 +11:00
flysand7 and GitHub
d41c7d52e7
Fix indentation
2024-12-01 11:50:00 +11:00
flysand7 and GitHub
d48c351330
Fix indentation
2024-12-01 11:48:52 +11:00
flysand7
596921fb7a
First pass
2024-12-01 11:42:24 +11:00
FourteenBrush
f9dc848926
Pass allocator to implicitly (de)allocating procs in core:log
2024-11-30 23:43:39 +01:00
Waqar Ahmed
8a27042d24
Use a proper Queue in thread.Pool
...
With lots of tasks the dynamic array takes a big performance hit as its
allocating all the time on pop_front
2024-11-30 22:29:47 +05:00
Laytan Laats
1cece52359
dynlib: unload library before loading again & add LIBRARY_FILE_EXTENSION constant
2024-11-28 21:08:08 +01:00
Jeroen van Rijn
8581240ece
Make O_RDONLY default for os.open on all platforms.
...
And also moved Windows file procs to `os_windows.odin`, in line with all the other platforms who didn't have a dedicated `file_<platform>.odin`
2024-11-28 15:57:48 +01:00
Evan Martinez and GitHub
36481f6d4a
Fix binomial function
2024-11-28 00:28:26 -07:00
zhylmzr
c2b6a14cd7
fix DNS_RECORD.Data error align on windows i386
...
fixed: https://github.com/odin-lang/Odin/issues/4520
2024-11-27 20:15:34 +08:00
Laytan Laats
ad80aa6d28
sys/info & odin report: rework macos version retrieval
2024-11-26 22:28:21 +01:00
Laytan Laats
767daf4a9c
add macos 15.1.1 to odin report and sys/info
2024-11-26 18:46:27 +01:00
o:tone and GitHub
c3478e0002
fix unmarshal unhandled error ( #4515 )
...
* fix unmarshal unhandled error
2024-11-25 13:15:33 +01:00
gingerBill
12e7ff1e3c
Remove core:c/frontend
2024-11-24 12:32:10 +00:00
Colin Davidson
da3a7a25c7
oops
2024-11-20 14:07:23 -08:00
Colin Davidson
3bb73eacfc
fix parsing issue around utc/localtime split
2024-11-20 12:09:32 -08:00
jakubtomsu
86c84f2621
Fix a bug in hxa decoder found by the new check
2024-11-17 21:35:49 +01:00