[Win32] Remove obsolete codePage parameter from TCHAR constructors#3362
Open
HeikoKlare wants to merge 1 commit into
Open
[Win32] Remove obsolete codePage parameter from TCHAR constructors#3362HeikoKlare wants to merge 1 commit into
HeikoKlare wants to merge 1 commit into
Conversation
Contributor
d2397f5 to
c77d695
Compare
The TCHAR.codePage parameter has been ignored since Win9x support was dropped. All call sites passed 0 (OS.CP_ACP) or the result of Control.getCodePage() which unconditionally returned OS.CP_ACP = 0. Remove the parameter from all four TCHAR constructors and update the call sites. Also remove the now-dead Control.getCodePage() method, the OS.CP_ACP constant, and the local cp/codePage variables that existed solely to supply the argument. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Conflicts: # bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java # bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java # bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java # Conflicts: # bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
c77d695 to
6ff6a99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
TCHAR.codePageparameter has been silently ignored since Win9x/ANSI support was dropped. All Win32 calls in SWT use Unicode APIs exclusively, so the parameter was vestigial.codePagefrom all fourTCHARconstructorsControl.getCodePage()method (it unconditionally returnedOS.CP_ACP = 0)OS.CP_ACP = 0x0constantcp/codePagevariables that existed solely to pass toTCHARconstructorsTCHARclass Javadoc to reflect its actual purpose as a null-terminatedchar[]buffer for Win32 Unicode APIs🤖 Generated with Claude Code