Skip to content

Commit

Permalink
chore: Add links for derived source code
Browse files Browse the repository at this point in the history
Add a link for derived source code to comply with our open-source
code policy.

Fixes GH-2844
  • Loading branch information
philipphofmann committed Oct 4, 2023
1 parent 7fa1b2f commit e151ace
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/*
File: UIImageEffects.h
Copied from
https://github.com/robovm/apple-ios-samples/blob/1f6b14ef6e2bda610ef8f1c93b16bf76b8594fbb/UIImageEffects/UIImageEffects/UIImageEffects.h
File: UIImageEffects.h
Abstract: This class contains methods to apply blur and tint effects to an image.
This is the code you’ll want to look out to find out how to use vImage to
efficiently calculate a blur.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/*
File: UIImageEffects.m
Copied from
https://github.com/robovm/apple-ios-samples/blob/1f6b14ef6e2bda610ef8f1c93b16bf76b8594fbb/UIImageEffects/UIImageEffects/UIImageEffects.m
File: UIImageEffects.m
Abstract: This class contains methods to apply blur and tint effects to an image.
This is the code you’ll want to look out to find out how to use vImage to
efficiently calculate a blur.
Expand Down
1 change: 1 addition & 0 deletions SentryTestUtils/Dynamic/Dynamic.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Copied from https://github.com/mhdhejazi/Dynamic/blob/772883073d044bc754d401cabb6574624eb3778f/Sources/Dynamic/Dynamic.swift
//
// Dynamic
// Created by Mhd Hejazi on 4/15/20.
Expand Down
1 change: 1 addition & 0 deletions SentryTestUtils/Dynamic/Invocation.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Copied from https://github.com/mhdhejazi/Dynamic/blob/772883073d044bc754d401cabb6574624eb3778f/Sources/Dynamic/Invocation.swift
//
// Dynamic
// Created by Mhd Hejazi on 4/15/20.
Expand Down
3 changes: 2 additions & 1 deletion SentryTestUtils/Dynamic/Logger.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//
// Copied from https://github.com/mhdhejazi/Dynamic/blob/772883073d044bc754d401cabb6574624eb3778f/Sources/Dynamic/Logger.swift
//
// Dynamic
// Created by Mhd Hejazi on 4/15/20.
// Copyright © 2020 Samabox. All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions SentryTestUtils/Dynamic/TypeMapping.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Copied from https://github.com/mhdhejazi/Dynamic/blob/772883073d044bc754d401cabb6574624eb3778f/Sources/Dynamic/TypeMapping.swift
//
// Dynamic
// Created by Mhd Hejazi on 4/18/20.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/SentryReachability.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SentryReachability.m
// Adapted from
// https://github.com/bugsnag/bugsnag-cocoa/blob/2f373f21b965f1b13d7070662e2d35f46c17d975/Bugsnag/Delivery/BSGConnectivity.m
//
// Created by Jamie Lynch on 2017-09-04.
//
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/include/SentryReachability.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SentryReachability.h
// Adapted from
// https://github.com/bugsnag/bugsnag-cocoa/blob/2f373f21b965f1b13d7070662e2d35f46c17d975/Bugsnag/Delivery/BSGConnectivity.h
//
// Created by Jamie Lynch on 2017-09-04.
//
Expand Down
6 changes: 3 additions & 3 deletions Sources/SentryCrash/Recording/Tools/SentryCrashObjCApple.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ typedef struct __CFRuntimeBase {
# define __CF_BIG_ENDIAN__ 0
#endif

#define CF_INFO_BITS (!!(__CF_BIG_ENDIAN__) * 3)
#define CF_RC_BITS (!!(__CF_LITTLE_ENDIAN__) * 3)
#define CF_INFO_BITS (!!(__CF_BIG_ENDIAN__)*3)
#define CF_RC_BITS (!!(__CF_LITTLE_ENDIAN__)*3)

/* Bit manipulation macros */
/* Bits are numbered from 31 on left to 0 on right */
Expand All @@ -299,7 +299,7 @@ typedef struct __CFRuntimeBase {
/* In the following, N1 and N2 specify an inclusive range N2..N1 with N1 >= N2
*/
#define __CFBitfieldMask(N1, N2) ((((UInt32)~0UL) << (31UL - (N1) + (N2))) >> (31UL - N1))
#define __CFBitfieldGetValue(V, N1, N2) (((V) & __CFBitfieldMask(N1, N2)) >> (N2))
#define __CFBitfieldGetValue(V, N1, N2) (((V)&__CFBitfieldMask(N1, N2)) >> (N2))

// ======================================================================
#pragma mark - CF-1153.18/CFString.c -
Expand Down
12 changes: 8 additions & 4 deletions Tests/SentryTests/SentryOptionsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,10 @@ - (void)testChanging_enableTracing_afterSetting_tracesSampleRate
- (void)testChanging_enableTracing_afterSetting_tracesSampler
{
SentryOptions *options = [[SentryOptions alloc] init];
options.tracesSampler
= ^NSNumber *(SentrySamplingContext *__unused samplingContext) { return @0.1; };
options.tracesSampler = ^NSNumber *(SentrySamplingContext *__unused samplingContext)
{
return @0.1;
};
options.enableTracing = NO;
XCTAssertNil(options.tracesSampleRate);
options.enableTracing = FALSE;
Expand Down Expand Up @@ -1159,8 +1161,10 @@ - (void)testDefaultInitialScope

- (void)testInitialScope
{
SentryScope * (^initialScope)(SentryScope *)
= ^SentryScope *(SentryScope *scope) { return scope; };
SentryScope * (^initialScope)(SentryScope *) = ^SentryScope *(SentryScope *scope)
{
return scope;
};
SentryOptions *options = [self getValidOptions:@{ @"initialScope" : initialScope }];
XCTAssertIdentical(initialScope, options.initialScope);
}
Expand Down

0 comments on commit e151ace

Please sign in to comment.