View Issue Details

IDProjectCategoryView StatusLast Update
0000511LDMud 3.3LPC Compiler/Preprocessorpublic2018-01-29 21:57
ReporterGnomi Assigned Tolars 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.1
Fixed in Version3.3.716 
Summary0000511: Lfuns implementing Inline closures should be 'private nomask'
DescriptionHi,

when using new inlines the lfuns implementing them are public (unless overridden with a 'default' statement).

In 3.2.9-dev.332/3.3.97 in the old implementation they all got 'private nomask', because you should only call the function with the closure, not another way (especially not rely on the function name). 'nomask' was dropped in 3.2.9-dev.334/3.3.99, because the driver could not handle two inherited private nomask functions with the same name, but that's not true anymore for 3.3.

So in my opinion lfuns implementing old inlines should be nomask, too, and new inlines should become private and nomask (regardless of any 'default' statement).

Greetings,
Gnomi

PS: I attached a patch that we use in UNItopia, so it's for new inlines only, but the other case is just as trivial. :-)
TagsNo tags attached.
Attached Files
privinlines.diff (548 bytes)   
Index: trunk/src/prolang.y
===================================================================
--- trunk/src/prolang.y	(Revision 2314)
+++ trunk/src/prolang.y	(Arbeitskopie)
@@ -5018,6 +5018,10 @@
     }
 
     ident = make_shared_identifier(name, I_TYPE_UNKNOWN, 0);
+    
+    /* Lfuns implementing inline closures should not be callable
+       without the closoure and also not be overrideable.*/
+    returntype.typeflags |= TYPE_MOD_NO_MASK | TYPE_MOD_PRIVATE;
 
     def_function_typecheck(returntype, ident, MY_TRUE);
 #ifdef DEBUG_INLINES
privinlines.diff (548 bytes)   

Activities

Gnomi

2007-08-28 07:57

manager   ~0000538

This bug report should have been for LDMud 3.3, not 3.2.

lars

2007-10-06 19:46

reporter   ~0000553

For 3.2 and the old inline closures in 3.3 this was actually no longer a problem - some earlier change
had already made them 'private nomask' again.

For the new kind, the patch went in with revision 2334 (in case we need to back it out again after all).

Issue History

Date Modified Username Field Change
2007-08-28 07:49 Gnomi New Issue
2007-08-28 07:49 Gnomi File Added: privinlines.diff
2007-08-28 07:57 Gnomi Note Added: 0000538
2007-10-06 19:44 lars Project LDMud 3.2 => LDMud 3.3
2007-10-06 19:46 lars Status new => resolved
2007-10-06 19:46 lars Fixed in Version => 3.3.716
2007-10-06 19:46 lars Resolution open => fixed
2007-10-06 19:46 lars Assigned To => lars
2007-10-06 19:46 lars Note Added: 0000553
2010-11-16 09:42 lars Source_changeset_attached => ldmud.git master 42bf4d33
2018-01-29 18:59 lars Source_changeset_attached => ldmud.git master 42bf4d33
2018-01-29 21:57 lars Source_changeset_attached => ldmud.git master 42bf4d33