Sign in Join
Wiki copytemporary

User Changes 3.0.4: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: User Changes 3.0.4

OldNewLine
1+## About this page
2+
3+Listed below are intentional changes made to the FPC compiler (3.0.4) since the [[User Changes 3.0.2|previous release]] that may break existing code. The list includes reasons why these changes have been implemented, and suggestions for how you might adapt your code if you find that previously working code has been adversely affected by these recent changes.
4+
5+The list of new features that do not break existing code can be found [[FPC New Features Trunk|here]].
6+
7+Please add revision numbers to the entries from now on. This facilitates moving merged items to the user changes of a release.
8+
9+## All systems
10+
11+### Implementation Changes
12+
13+### Unit changes
14+
15+#### SysUtils
16+
17+##### TList auto-growth
18+
19+- **Old behaviour:** Lists with number of elements greater than 127 was expanded by 1/4 of its current capacity
20+- **New behaviour:** Adds two new thresholds. If number of elements is greater than 128 MB then list is expanded by constant amount of 16 MB elements (corresponds to 1/8 of 128 MB). If number of elements is greater then 8 MB then list is expanded by 1/8 of its current capacity.
21+- **Reason for change:** Avoid out-of-memory when very large lists are expanded
22+
23+#### Inifiles
24+
25+- **Old behaviour:** In 3.0.2, TMemIniFile.ReadSectionValues did not read invalid name/value pairs
26+- **New behaviour:** 3.0.4 reads invalid name/value pairs again.
27+- **Reason for change:** Wrong defaults assumptions in 3.0.2, change is more delphi and 3.0.0 compat
28+- **Remedy:** If you only want real name/value pairs, pass an additional empty set parameter to ReadSectionValues. if you need invalid lines and comments please pass \[svoIncludeComments,svoIncludeInvalid\]
29+
30+#### DB
31+
32+##### TParam.LoadFromFile sets share mode to fmShareDenyWrite
33+
34+- **Old behaviour**: TFileStream.Create(FileName, fmOpenRead) was used, which has blocked subsequent access (also read-only) to same file
35+- **New behaviour**: TFileStream.Create(FileName, fmOpenRead+fmShareDenyWrite) is used, which does not block read access to same file
36+- **Remedy**: If your application requires exclusive access to file specify fmShareExclusive
37+
38+## i386-go32v2
39+
40+### Unit changes
41+
42+#### go32
43+
44+##### set_segment_base_address
45+
46+- **Old behaviour:** The second parameter, specifying the new segment base address was longint (signed 32-bit).
47+- **New behaviour:** The second parameter was changed to dword (unsigned 32-bit).
48+- **Reason for change:** Avoid range check errors for segment base addresses larger than 2GB.
49+
50+##### set_segment_limit
51+
52+- **Old behaviour:** The second parameter, specifying the new segment limit was longint (signed 32-bit).
53+- **New behaviour:** The second parameter was changed to dword (unsigned 32-bit).
54+- **Reason for change:** Avoid range check errors for segment limits larger than 2GB.
55+
56+##### get_segment_limit
57+
58+- **Old behaviour:** The result of get_segment_limit was longint (signed 32-bit).
59+- **New behaviour:** The result of get_segment_limit was changed to dword (unsigned 32-bit).
60+- **Reason for change:** Avoid range check errors for segment limits larger than 2GB.
61+
62+##### set_descriptor_access_right
63+
64+- **Old behaviour**: The set_descriptor_access_right function returned a longint result, which wasn't well defined.
65+- **New behaviour**: The set_descriptor_access_right function now returns a boolean result - TRUE if the function has been successful, FALSE if there was an error.
66+- **Reason**: Bug fix. Previously, the set_descriptor_access_right function would return a longint, but only the low 16-bits were initialized (with 1 indicating success, 0 - failure).
67+- **Remedy**: Instead of checking whether the result of set_descriptor_access_right is equal or different than 0, just use the boolean return value (TRUE indicates success).
68+
69+##### get_linear_address
70+
71+- **Old behaviour:** The first parameter (phys_addr - specifying the physical address to be mapped) and the function result (specifying the linear address, where phys_addr was mapped) were longint (signed 32-bit).
72+- **New behaviour:** The first parameter (phys_addr) and the function result were changed to dword (unsigned 32-bit).
73+- **Reason for change:** Avoid range check errors for physical or linear addresses larger than 2GB.
74+
75+##### map_device_in_memory_block
76+
77+- **Old behaviour:** All four parameters to map_device_in_memory block were longint (signed 32-bit).
78+- **New behaviour:** The four parameters were changed to dword (unsigned 32-bit).
79+- **Reason for change:** Avoid range check errors for physical addresses, memory handles or memory offsets, larger than 2GB.
80+
81+## Previous release notes
82+
83+---
84+*From the Free Pascal wiki, page "User Changes 3.0.4", as it stood on 2017-12-07 after a change by Nickysn, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
85+Category: FPC User Changes by release
86+Category: Release Notes

Back to history