Skip to content

Commit

Permalink
[ObjC] Breaking Change: Remove deprecated apis.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 684478480
  • Loading branch information
thomasvl authored and copybara-github committed Oct 10, 2024
1 parent 29c232a commit 2a52b90
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 51 deletions.
3 changes: 0 additions & 3 deletions objectivec/GPBDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ __attribute__((objc_subclassing_restricted))
@property(nonatomic, readonly, copy) NSString *package;
/** The objc prefix declared in the proto file. */
@property(nonatomic, readonly, copy, nullable) NSString *objcPrefix;
/** The syntax of the proto file, this property will be removed in the future. */
@property(nonatomic, readonly) GPBFileSyntax syntax
__attribute__((deprecated("Syntax will be removed in the future.")));

@end

Expand Down
1 change: 0 additions & 1 deletion objectivec/GPBDescriptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ @implementation GPBFileDescriptor {

@synthesize package = package_;
@synthesize objcPrefix = objcPrefix_;
@synthesize syntax = syntax_;

- (instancetype)initWithPackage:(NSString *)package
objcPrefix:(NSString *)objcPrefix
Expand Down
15 changes: 0 additions & 15 deletions objectivec/GPBMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,6 @@ CF_EXTERN_C_END
(nullable id<GPBExtensionRegistry>)extensionRegistry
error:(NSError **)errorPtr;

/**
* Parses the given data as this message's class, and merges those values into
* this message.
*
* @param data The binary representation of the message to merge.
* @param extensionRegistry The extension registry to use to look up extensions.
*
* @exception GPBCodedInputStreamException Exception thrown when parsing was
* unsuccessful.
**/
- (void)mergeFromData:(NSData *)data
extensionRegistry:(nullable id<GPBExtensionRegistry>)extensionRegistry
__attribute__((deprecated(
"Use -mergeFromData:extensionRegistry:error: instead, especaily if calling from Swift.")));

/**
* Parses the given data as this message's class, and merges those values into
* this message.
Expand Down
9 changes: 0 additions & 9 deletions objectivec/GPBMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -2227,15 +2227,6 @@ - (void)clearExtension:(GPBExtensionDescriptor *)extension {

#pragma mark - mergeFrom

- (void)mergeFromData:(NSData *)data extensionRegistry:(id<GPBExtensionRegistry>)extensionRegistry {
GPBCodedInputStream *input = [[GPBCodedInputStream alloc] initWithData:data];
@try {
[self mergeFromCodedInputStream:input extensionRegistry:extensionRegistry endingTag:0];
} @finally {
[input release];
}
}

- (BOOL)mergeFromData:(NSData *)data
extensionRegistry:(nullable id<GPBExtensionRegistry>)extensionRegistry
error:(NSError **)errorPtr {
Expand Down
11 changes: 0 additions & 11 deletions objectivec/GPBWellKnownTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,6 @@ typedef NS_ENUM(NSInteger, GPBWellKnownTypesErrorCode) {
**/
- (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval;

// These next two methods are deprecated because GBPDuration has no need of a
// "base" time. The older methods were about symmetry with GBPTimestamp, but
// the unix epoch usage is too confusing.

/** Deprecated, use timeInterval instead. */
@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970
__attribute__((deprecated("Use timeInterval")));
/** Deprecated, use initWithTimeInterval: instead. */
- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970
__attribute__((deprecated("Use initWithTimeInterval:")));

@end

#pragma mark - GPBAny
Expand Down
12 changes: 0 additions & 12 deletions objectivec/GPBWellKnownTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ - (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval {
return self;
}

- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 {
return [self initWithTimeInterval:timeIntervalSince1970];
}

- (NSTimeInterval)timeInterval {
return TimeIntervalFromSecondsAndNanos(self.seconds, self.nanos);
}
Expand All @@ -129,14 +125,6 @@ - (void)setTimeInterval:(NSTimeInterval)timeInterval {
self.nanos = nanos;
}

- (NSTimeInterval)timeIntervalSince1970 {
return self.timeInterval;
}

- (void)setTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 {
self.timeInterval = timeIntervalSince1970;
}

@end

#pragma mark - GPBAny
Expand Down

0 comments on commit 2a52b90

Please sign in to comment.