Add set/get for requiresSecureCoding

This commit is contained in:
Gregory John Casamento 2020-05-15 10:06:39 -04:00
parent 1a6a091fc4
commit 4230180eab
2 changed files with 16 additions and 3 deletions

View file

@ -270,6 +270,7 @@ extern "C" {
#undef GSIArray
#endif
NSZone *_zone; /* Zone for allocating objs. */
BOOL _requiresSecureCoding;
#endif
#if GS_NONFRAGILE
#else
@ -308,6 +309,18 @@ extern "C" {
*/
+ (id) unarchiveObjectWithFile: (NSString*)aPath;
/**
* Returns whether the current instance of the archiver needs secure
* coding.
*/
- (BOOL) requiresSecureCoding;
/**
* Sets whether the current instance of the archiver needs secure
* coding.
*/
- (void) setRequiresSecureCoding: (BOOL)flag;
/**
* Returns class substituted for class name specified by aString when
* encountered in the archive being decoded from, or nil if there is no
@ -315,7 +328,7 @@ extern "C" {
* translation map, which is searched on decoding if no match found here.
*/
- (Class) classForClassName: (NSString*)aString;
/**
* Sets class substituted for class name specified by aString when
* encountered in the archive being decoded from, or nil if there is no

View file

@ -367,12 +367,12 @@ static NSMapTable *globalClassMap = 0;
- (BOOL)requiresSecureCoding
{
return NO;
return _requiresSecureCoding;
}
- (void)setRequiresSecureCoding: (BOOL)secure
{
return;
_requiresSecureCoding = secure;
}
- (Class) classForClassName: (NSString*)aString