You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2525,6 +2525,7 @@ static int jk_encode_add_atom_to_buffer(JKEncodeState *encodeState, void *object
2525
2525
return(0);
2526
2526
}
2527
2527
2528
+
#if0
2528
2529
// When we encounter a class that we do not handle, and we have either a delegate or block that the user supplied to format unsupported classes,
2529
2530
// we "re-run" the object check. However, we re-run the object check exactly ONCE. If the user supplies an object that isn't one of the
2530
2531
// supported classes, we fail the second type (i.e., double fault error).
@@ -2552,7 +2553,39 @@ static int jk_encode_add_atom_to_buffer(JKEncodeState *encodeState, void *object
2552
2553
else { jk_encode_error(encodeState, @"Unable to serialize object class %@ that was returned by the unsupported class formatter. Original object class was %@.", (object == NULL) ? @"NULL" : NSStringFromClass([object class]), NSStringFromClass([encodeCacheObject class])); return(1); }
2553
2554
}
2554
2555
}
2556
+
#else
2555
2557
2558
+
// When we encounter a class that we do not handle, and we have either a delegate or block that the user supplied to format unsupported classes,
2559
+
// we "re-run" the object check. However, we re-run the object check exactly ONCE. If the user supplies an object that isn't one of the
2560
+
// supported classes, we fail the second type (i.e., double fault error).
if(object == encodeCacheObject) { jk_encode_error(encodeState, @"Unable to serialize object class %@.", NSStringFromClass([encodeCacheObject class])); return(1); }
2584
+
else { jk_encode_error(encodeState, @"Unable to serialize object class %@ that was returned by the unsupported class formatter. Original object class was %@.", (object == NULL) ? @"NULL" : NSStringFromClass([object class]), NSStringFromClass([encodeCacheObject class])); return(1); }
2585
+
}
2586
+
}
2587
+
2588
+
#endif
2556
2589
// This is here for the benefit of the optimizer. It allows the optimizer to do loop invariant code motion for the JKClassArray
2557
2590
// and JKClassDictionary cases when printing simple, single characters via jk_encode_write(), which is actually a macro:
0 commit comments