25 Commits

Author SHA1 Message Date
Tony Parker
caa08cf226
Enable complete concurrency checking in Foundation 2024-06-04 10:41:59 -07:00
Jeremy Schonfeld
e5211f2926
(122981400) Standardize on using internal import 2024-03-06 13:42:02 -08:00
Tony Parker
2f68bac57c
Update JSONDecoder to prepare for PropertyListDecoder (#459)
Co-authored-by: Kevin Perry <kperry@apple.com>
2024-03-06 11:47:46 -08:00
Guillaume Lessard
3e268afe74
Implement base64 for Data in Swift (#337)
* [base64] initial Base-64 re-implementation

* Add BufferView._assertBounds() functions

- they act the same as the _checkBounds() functions
- but only in debug mode

* Improve BufferView slicing

- when all the necessary checking has been done, the BufferView initializer doesn’t need to validate the buffer length another time.

* remove premature reference to typealias

* add the `unsafe` particle to an initializer argument label

* [base64] modify Base64 with `OutputBuffer` and `BufferView`

* remove unused bits in OutputBuffer

* express a cascaded if statement as a switch

* make internal decoding initializer failable

* Update Sources/FoundationEssentials/Data/Data+Base64.swift

Co-authored-by: Elliot Knight <63256761+Harry-KNIGHT@users.noreply.github.com>

---------

Co-authored-by: Elliot Knight <63256761+Harry-KNIGHT@users.noreply.github.com>
2024-02-22 10:31:08 -08:00
Tony Parker
996ddf67d3
Make sure that CShim functions are (a) hidden in framework mode, because external clients don't use them and (b) exported in package mode, because external clients may end up calling them (#341) 2023-12-06 12:50:54 -08:00
Joey
32bf8bc848
Documentation - Consistency Fixes (#187)
* Documentation for attributed string's number formatting.

* Documentation - Typos & Consistency Fixes
2023-06-29 10:55:29 -07:00
Guillaume Lessard
21f76b8368
Work around a miscompilation (#141) 2023-05-19 14:27:03 -07:00
Guillaume Lessard
38705d65fd
Use inout as workaround for delayed SE-0377 (#133)
rdar://109425225

We expected `__owned` to be the workaround, but that exposed a  different bug.
2023-05-17 13:44:31 -07:00
kperryua
34ea98136a
Remove String.reserveCapacity() calls with dubious value from JSONScanners (#119) 2023-05-16 15:20:58 -07:00
Jeremy Schonfeld
9c72d351d2
(105902981) Replace @_implementationOnly imports with package imports in FoundationPreview (#109) 2023-05-12 11:36:10 -07:00
Tina Liu
3aa00e5c3e
Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)" (#115)
* Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)"

This reverts commit 8f08a649db1f3eb31593cdae7a30c5e95cb614a7.

* Reapply fb718cd3fb9f058a5fd6d736cec9c2b99d6f7dc6 fix to the other restored LockedState
2023-05-11 15:19:01 -07:00
Tina Liu
8f08a649db
Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)
* Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials

- Modules will access FoundationInternals types with `package import FoundationInternals`. This is currently an experimental feature of `AccessLevelOnImport`.
- Move `LockedState` to FoundationInternals and publicize functions needed by other modules.
2023-05-10 12:16:20 -07:00
Guillaume Lessard
aefeed4540
Use __owned parameter modifier (#102) 2023-05-09 13:11:43 -07:00
Alexander Cyon
09606b457d
Fix typos (#68) 2023-04-29 06:28:00 -07:00
Guillaume Lessard
d185fb59c5
rdar://108230575 (fix ABI issues in JSONScanner and BufferView) (#53) 2023-04-25 13:15:57 -07:00
Charles Hu
0ac5999256
rdar://107847458 (Fix FoundationPreview CalendarTests on Linux) (#36) 2023-04-18 13:59:56 -07:00
Guillaume Lessard
450cf1c600
Improve deallocation of copied buffer (#26) 2023-04-14 17:50:37 -07:00
Guillaume Lessard
4b8a234a5b
Rename the docStart parameter to fullSource 2023-04-11 15:07:33 -07:00
Guillaume Lessard
fb332a8b28
pass buffer as context reference
- this prevents what is effectively as an address escape, and allows better control of index bounds.
2023-04-11 14:14:43 -07:00
Guillaume Lessard
aaa9d2cfbd
split out slow path of stringValue() 2023-04-11 10:59:48 -07:00
Guillaume Lessard
5d6ab4a2ab
add helpful labels to more return tuples 2023-04-11 10:59:47 -07:00
Guillaume Lessard
5091f252c2
Rename DocumentReader’s index properties 2023-04-11 10:59:47 -07:00
Guillaume Lessard
1ab3832106
layer json decoding over bufferview 2023-04-11 10:59:47 -07:00
Guillaume Lessard
bd712abbc3
change sourceLocation to use UnsafeRawPointer 2023-04-11 10:57:45 -07:00
Charles Hu
34c45c169c rdar://107156343 (Move JSONEncoder to FoundationPreview) 2023-03-29 09:56:00 -07:00