View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000531 | LDMud 3.5 | LPC Compiler/Preprocessor | public | 2008-02-17 18:56 | 2017-09-30 16:42 |
Reporter | Sorcerer | Assigned To | Gnomi | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 3.5.0 | ||||
Summary | 0000531: Passing varargs argument by reference | ||||
Description | It would be great to be able to pass references to functions using varargs arguments for constructs like: walk_mapping(m, function void (mixed key, varargs mixed *values) { ... }) (I filed this originally as 0000530 against 3.2-dev but it was meant to go here to 3.3, sorry for that) | ||||
Tags | No tags attached. | ||||
|
Yes, actually I had some code yesterday, which contained your example line in the first attempt. ;-) But I don't know if there is an easy way for doing this. The driver justs puts all the args into an ordinary array and puts that array on the stack. So it would be necessary to allow putting T_LVALUES into arrays. In setup_new_frame2() in interpret.c is the following comment: * If <allowRefs> is TRUE, references may be passed as extended varargs * ('(varargs mixed *)'). Currently this is used only for simul efuns. * TODO: Investigate if holding references in arrays is really such a * TODO:: a bad thing. Maybe it's just an implementation issue. * TODO:: This also affects apply_low() and call_lambda(). My current knowledge of the driver code is not deep enough to give a qualified statement if it is 'bad thing'... ;-) Maybe someone else can comment on this one? BTW: My code yesterday had no need for the arguments to be passed as reference,so I used filter() (map() is ok as well). |
|
This one is also for the next unstable branch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-02-17 18:56 | Sorcerer | New Issue | |
2008-04-30 03:30 | zesstra | Note Added: 0000609 | |
2008-06-30 03:10 | Gnomi | Note Added: 0000624 | |
2008-06-30 03:11 | Gnomi | Status | new => assigned |
2008-06-30 03:11 | Gnomi | Assigned To | => Gnomi |
2008-07-02 01:13 | Gnomi | Project | LDMud 3.3 => LDMud 3.5 |
2008-07-02 06:13 | Gnomi | Relationship added | child of 0000546 |
2017-09-30 16:42 | Gnomi | Status | assigned => resolved |
2017-09-30 16:42 | Gnomi | Resolution | open => fixed |
2017-09-30 16:42 | Gnomi | Fixed in Version | => 3.5.0 |