Closed Bug 75169 Opened 24 years ago Closed 23 years ago

[API] strings do not compile cleanly on Win32

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: waterson, Assigned: scc)

References

Details

Attachments

(2 files)

I'm seeing the following warnings when compiling nsLineBox.cpp. I'm frightened. I suspect that some of the classes in the string library need to be declared __declspec(dllexport), but am not really sure. nsLineBox.cpp ..\..\..\..\dist\include\nsLocalString.h(80) : warning C4251: 'mHandle' : class 'nsBufferHandle<unsigned short>' needs to have dll-interface to be used by clients of class 'nsLocalString' ..\..\..\..\dist\include\nsLocalString.h(120) : warning C4251: 'mHandle' : class 'nsBufferHandle<char>' needs to have dll-interface to be used by clients of class 'nsLocalCString' ..\..\..\..\dist\include\nsCommonString.h(69) : warning C4251: 'mBuffer' : class 'nsAutoBufferHandle<unsigned short>' needs to have dll-interface to be used by clients of class 'nsCommonString' ..\..\..\..\dist\include\nsCommonString.h(98) : warning C4251: 'mBuffer' : class 'nsAutoBufferHandle<char>' needs to have dll-interface to be used by clients of class 'nsCommonCString'
Severity: normal → minor
Keywords: mozilla1.0
I need to untemplatize the buffer handle classes to eliminate these warnings.
Blocks: 70090
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
*** Bug 75025 has been marked as a duplicate of this bug. ***
These are the 0.9 bugs that didn't make it, and that I intend to fix in 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Summary: strings do not compile cleanly on Win32 → [API] strings do not compile cleanly on Win32
re-targeting milestones, starting from a clean slate
Target Milestone: mozilla0.9.1 → ---
All planned string API fixes need to be in by mozilla1.0.
Target Milestone: --- → mozilla1.0
See http://lxr.mozilla.org/seamonkey/search?string=BufferHandle%3C for a list of places that would be touched by an untemplitization.
I will not be bullied. After analysis of this bug, and discussion with jst, I have decided not to untemplatize these classes. No compiler mis-selections or errors have been associated with these templates, and it's a waste of time, effort, and churn to untemplatize them just to quite warnings that are in error (no actual linkage problems exist, the warnings are false). Therefore, the right fix is to disable that warning. Additionally, there are typos in my constants that I will fix in the same patch. Patch will be attached anon.
s/quite/quiet/
Not sure who's bullying you here (FWIW, I thought you already _did_ untemplatize these classes; wasn't that what the big mozilla-0.8.1 string landing was about? Guess I've been asleep at the wheel lately.) Anyway, I think you'll want to put that under |#ifdef XP_WIN|, right?
The compiler warnings were bullying me :-) We have other |#pragma disable|s not protected by |#ifdef| elsewhere in the build, but if you think it's needed, I'll modify the patch.
looking to waterson for sr=, jst for r=, and I'll send mail
Keywords: approval, patch, review
sr=waterson
r=jst
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: