Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
af5ad246
Unverified
Commit
af5ad246
authored
Nov 15, 2017
by
Thomas Van Lenten
Committed by
GitHub
Nov 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3882 from dmaclach/removeclass2
Remove unreferenced 'GPBMessageSignatureProtocol' class.
parents
91ff83c0
37a6672c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
GPBRootObject.m
objectivec/GPBRootObject.m
+8
-0
GPBUtilities.m
objectivec/GPBUtilities.m
+3
-10
GPBUtilities_PackagePrivate.h
objectivec/GPBUtilities_PackagePrivate.h
+2
-1
No files found.
objectivec/GPBRootObject.m
View file @
af5ad246
...
@@ -43,6 +43,14 @@
...
@@ -43,6 +43,14 @@
-
(
const
char
*
)
singletonNameC
;
-
(
const
char
*
)
singletonNameC
;
@end
@end
// We need some object to conform to the MessageSignatureProtocol to make sure
// the selectors in it are recorded in our Objective C runtime information.
// GPBMessage is arguably the more "obvious" choice, but given that all messages
// inherit from GPBMessage, conflicts seem likely, so we are using GPBRootObject
// instead.
@interface
GPBRootObject
()
<
GPBMessageSignatureProtocol
>
@end
@implementation
GPBRootObject
@implementation
GPBRootObject
// Taken from http://www.burtleburtle.net/bob/hash/doobs.html
// Taken from http://www.burtleburtle.net/bob/hash/doobs.html
...
...
objectivec/GPBUtilities.m
View file @
af5ad246
...
@@ -1216,8 +1216,11 @@ void GPBSetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field,
...
@@ -1216,8 +1216,11 @@ void GPBSetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field,
const
char
*
GPBMessageEncodingForSelector
(
SEL
selector
,
BOOL
instanceSel
)
{
const
char
*
GPBMessageEncodingForSelector
(
SEL
selector
,
BOOL
instanceSel
)
{
Protocol
*
protocol
=
Protocol
*
protocol
=
objc_getProtocol
(
GPBStringifySymbol
(
GPBMessageSignatureProtocol
));
objc_getProtocol
(
GPBStringifySymbol
(
GPBMessageSignatureProtocol
));
NSCAssert
(
protocol
,
@"Missing GPBMessageSignatureProtocol"
);
struct
objc_method_description
description
=
struct
objc_method_description
description
=
protocol_getMethodDescription
(
protocol
,
selector
,
NO
,
instanceSel
);
protocol_getMethodDescription
(
protocol
,
selector
,
NO
,
instanceSel
);
NSCAssert
(
description
.
name
!=
Nil
&&
description
.
types
!=
nil
,
@"Missing method for selector %@"
,
NSStringFromSelector
(
selector
));
return
description
.
types
;
return
description
.
types
;
}
}
...
@@ -1911,13 +1914,3 @@ BOOL GPBClassHasSel(Class aClass, SEL sel) {
...
@@ -1911,13 +1914,3 @@ BOOL GPBClassHasSel(Class aClass, SEL sel) {
free
(
methodList
);
free
(
methodList
);
return
result
;
return
result
;
}
}
#pragma mark - GPBMessageSignatureProtocol
// A series of selectors that are used solely to get @encoding values
// for them by the dynamic protobuf runtime code. An object using the protocol
// needs to be declared for the protocol to be valid at runtime.
@interface
GPBMessageSignatureProtocol
:
NSObject
<
GPBMessageSignatureProtocol
>
@end
@implementation
GPBMessageSignatureProtocol
@end
objectivec/GPBUtilities_PackagePrivate.h
View file @
af5ad246
...
@@ -309,7 +309,8 @@ NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key,
...
@@ -309,7 +309,8 @@ NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key,
// A series of selectors that are used solely to get @encoding values
// A series of selectors that are used solely to get @encoding values
// for them by the dynamic protobuf runtime code. See
// for them by the dynamic protobuf runtime code. See
// GPBMessageEncodingForSelector for details.
// GPBMessageEncodingForSelector for details. GPBRootObject conforms to
// the protocol so that it is encoded in the Objective C runtime.
@protocol
GPBMessageSignatureProtocol
@protocol
GPBMessageSignatureProtocol
@optional
@optional
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment