Closed Bug 11621 Opened 25 years ago Closed 25 years ago

xpidl string/wstring attribute setters should be constipated

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 7610

People

(Reporter: brendan, Assigned: mike+mozilla)

Details

See netwerk/base/public/nsIURI.idl and the nsIURI.h generated from it by xpidl:
SetSpec takes a char *, it should take a const char *.  This causes tons of code
to cast away const, which is evil and wrong.  Just as xpidl constipates string
in param C++ bindings, so it should for the setter's in param.

I'm willing to help fix all the breakage that changing xpidl to constipate
string setters will induce.

It'd help to have the generated NS_DECL* macros for interface methods, so we
could romp through the tree and replace those method decls with the macro call,
rather than add const here and there.

/be
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Marking as a dup of 7610.

I was putting this off before because of the xpidl-doesn't-build-on-mac problem
with changing xpidl synchronously with all of the .idl, but I just proved to
myself last night that (with beard's building fixes) it works just fine.  So
there shouldn't be any obstacle beyond finding a nice stretch of green to land
in.  Perhaps after XPCOM_DECL_IFOO, which I hope to do next.

Thanks for the offer of assistance; I might need it.


*** This bug has been marked as a duplicate of 7610 ***
Status: RESOLVED → VERIFIED
verified dup
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom
You need to log in before you can comment on or make changes to this bug.