Closed Bug 40107 Opened 25 years ago Closed 24 years ago

size_is(CONSTANT) doesn't work for arrays

Categories

(Core :: XPCOM, enhancement, P5)

enhancement

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: braden, Assigned: mike+mozilla)

Details

(Keywords: testcase)

Attachments

(1 file)

Looks like constants are nolonger working for arrays in XPIDL. Test case coming.
Attached file Simple test case (deleted) —
Keywords: testcase
I may have broken this when I tightened up checking of size_is and length_is a few weeks ago. xpidl used to do no checking whatsoever on the string between the parenthesis of size_is() and length_is() attributes. Then again... Has the XPConnect runtime understood constant array length in the past?
Did this ever work? Even if I disable my recent param-checking code (in xpidl_util.c:check_param_attribute), I still trip across an error at xpidl_typelib.c:588, which cvs blame claims was added by jband in September '99. If no, could you mark it as an enhancement?
This used to work, as of like 3 weeks ago. I don't think it should be marked as an enhancement.
Did it work with xpidl typelib generation mode? Also, did you have it working with the XPConnect runtime? Given lack of checks in xpidl, it probably would have worked with xpidl header-generation mode without complaint.
I'm pretty sure it compiled in both C++ header and typelib modes. Beyond compilation, I'm afraid I don't know. I didn't get along that far with this particular IDL file before it stopped compiling.
Marking as wontfix. I suspect that the runtime never supported this.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Okay, but *should* the runtime support this? Is WONTFIX really appropriate here, or should this be changed to an enhancement?
Ok, enhancement it is. It's pretty low priority... Got a patch?
Severity: blocker → enhancement
Status: RESOLVED → REOPENED
Priority: P3 → P5
Resolution: WONTFIX → ---
Not yet. Unfortunately, events have caused me to have to suspend the work this issue was blocking, so it may be a while before I have a chance to pursue this further. I'll see about providing a patch if this is still an open issue when I have time to get back to my Mozilla plugin work.
Summary: size_is(CONSTANT) nolonger works for arrays → size_is(CONSTANT) doesn't work for arrays
Target Milestone: --- → Future
It is intentional that constants can not be used for array sizes. The typelib format does not support it. Passing constant sized arrays is rare and passing the size at runtime is painless.
Status: REOPENED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → WONTFIX
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: