Closed Bug 2843 Opened 26 years ago Closed 26 years ago

Interfaces passed as in parameters in .idl files are generated as const

Categories

(Core :: XPCOM, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: scottputterman, Assigned: shaver)

Details

If you write the following in an .idl file void A(in nsIInterface interface) you get the following generated code: NS_IMETHOD A(const nsIInterface *interface) There's nothing wrong with this, but it does mean that you can only call const methods on "interface". If you do something like "interface->QueryInterface" on Visual C++ 6.0 on Windows, you'll get a compiler error since "QueryInterface" isn't a const function. Right now you can get around it by casting "interface" to a "nsIInterface *" before using it, but it seems like it would make it easier for the interface to not be const.
Setting all current Open/Normal to M4.
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
will mark verified assuming reporter agrees with fix
QA Contact: 3819
Status: RESOLVED → VERIFIED
didn't hear any complaining so marking verified
bulk reassigning all bugs from shaver's @netscape account to his @mozill acount
Status: RESOLVED → VERIFIED
Component: xpidl → XPCOM
QA Contact: paulmac → xpcom
You need to log in before you can comment on or make changes to this bug.