Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ad4f2e42
Commit
ad4f2e42
authored
Sep 07, 1994
by
Kresten Krab Thorup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(conformsTo:): Change implementati to allways use class to do lookup.
From-SVN: r8030
parent
decab89e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
gcc/objc/Object.m
+14
-4
No files found.
gcc/objc/Object.m
View file @
ad4f2e42
...
@@ -194,12 +194,17 @@ extern int errno;
...
@@ -194,12 +194,17 @@ extern int errno;
// Indicates if the receiving class or instance conforms to the given protocol
// Indicates if the receiving class or instance conforms to the given protocol
// not usually overridden by subclasses
// not usually overridden by subclasses
-
(
BOOL
)
conformsTo
:
(
Protocol
*
)
aProtocol
//
// Modified 9/5/94 to always search the class object's protocol list, rather
// than the meta class.
+
(
BOOL
)
conformsTo
:
(
Protocol
*
)
aProtocol
{
{
int
i
;
int
i
;
struct
objc_protocol_list
*
proto_list
;
struct
objc_protocol_list
*
proto_list
;
id
parent
;
for
(
proto_list
=
isa
->
protocols
;
for
(
proto_list
=
((
Class
*
)
self
)
->
protocols
;
proto_list
;
proto_list
=
proto_list
->
next
)
proto_list
;
proto_list
=
proto_list
->
next
)
{
{
for
(
i
=
0
;
i
<
proto_list
->
count
;
i
++
)
for
(
i
=
0
;
i
<
proto_list
->
count
;
i
++
)
...
@@ -209,12 +214,17 @@ extern int errno;
...
@@ -209,12 +214,17 @@ extern int errno;
}
}
}
}
if
([
self
superClass
])
if
(
parent
=
[
self
superClass
])
return
[
[
self
superClass
]
conformsTo
:
aProtocol
];
return
[
parent
conformsTo
:
aProtocol
];
else
else
return
NO
;
return
NO
;
}
}
-
(
BOOL
)
conformsTo
:
(
Protocol
*
)
aProtocol
{
return
[[
self
class
]
conformsTo
:
aProtocol
];
}
-
(
IMP
)
methodFor
:
(
SEL
)
aSel
-
(
IMP
)
methodFor
:
(
SEL
)
aSel
{
{
return
(
method_get_imp
(
object_is_instance
(
self
)
return
(
method_get_imp
(
object_is_instance
(
self
)
...
...
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