Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOLegacyScriptWhitelist.h File Reference
import "OOCocoa.h"
+ Include dependency graph for OOLegacyScriptWhitelist.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

NSArray * OOSanitizeLegacyScript (NSArray *script, NSString *context, BOOL allowAIMethods)
 
NSArray * OOSanitizeLegacyScriptConditions (NSArray *conditions, NSString *context)
 
BOOL OOLegacyConditionsAreSanitized (NSArray *conditions)
 

Function Documentation

◆ OOLegacyConditionsAreSanitized()

BOOL OOLegacyConditionsAreSanitized ( NSArray * conditions)

Definition at line 170 of file OOLegacyScriptWhitelist.m.

171{
172 if ([conditions count] == 0) return YES; // Empty array is safe.
173 return [[conditions objectAtIndex:0] isKindOfClass:[NSArray class]];
174}
unsigned count

References count.

Referenced by OOSanitizeLegacyScriptConditionsInternal().

+ Here is the caller graph for this function:

◆ OOSanitizeLegacyScript()

NSArray * OOSanitizeLegacyScript ( NSArray * script,
NSString * context,
BOOL allowAIMethods )

Definition at line 63 of file OOLegacyScriptWhitelist.m.

64{
65 SanStackElement stackRoot = { NULL, context, 0 };
66 NSArray *result = OOSanitizeLegacyScriptInternal(script, &stackRoot, allowAIMethods);
67 return [OODeepCopy(result) autorelease];
68}
id OODeepCopy(id object) OO_RETURNS_RETAINED
Definition OODeepCopy.m:31
static NSArray * OOSanitizeLegacyScriptInternal(NSArray *script, SanStackElement *stack, BOOL allowAIMethods)

References OOSanitizeLegacyScriptInternal().

+ Here is the call graph for this function:

◆ OOSanitizeLegacyScriptConditions()

NSArray * OOSanitizeLegacyScriptConditions ( NSArray * conditions,
NSString * context )

Definition at line 117 of file OOLegacyScriptWhitelist.m.

118{
119 if (context == nil) context = @"<anonymous conditions>";
120 SanStackElement stackRoot = { NULL, context, 0 };
121 NSArray *result = OOSanitizeLegacyScriptConditionsInternal(conditions, &stackRoot);
122 return [OODeepCopy(result) autorelease];
123}
static NSArray * OOSanitizeLegacyScriptConditionsInternal(NSArray *conditions, SanStackElement *stack)
return nil

References nil, and OOSanitizeLegacyScriptConditionsInternal().

+ Here is the call graph for this function: