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
a1feef75
Commit
a1feef75
authored
Sep 22, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace use of __obj_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12765
parent
d2ca2ea6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
gcc/objc/objc-list.h
+5
-8
gcc/objc/objects.c
+3
-3
No files found.
gcc/objc/objc-list.h
View file @
a1feef75
/* Generic single linked list to keep various information
Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
Author: Kresten Krab Thorup
Contributed by Kresten Krab Thorup.
This file is part of GNU CC.
...
...
@@ -28,8 +27,6 @@ Boston, MA 02111-1307, USA. */
#ifndef __GNU_OBJC_LIST_H
#define __GNU_OBJC_LIST_H
void
*
__objc_xrealloc
(
void
*
optr
,
size_t
size
);
void
*
__objc_xmalloc
(
size_t
size
);
struct
objc_list
{
void
*
head
;
...
...
@@ -43,7 +40,7 @@ list_cons(void* head, struct objc_list* tail)
{
struct
objc_list
*
cell
;
cell
=
(
struct
objc_list
*
)
__objc_x
malloc
(
sizeof
(
struct
objc_list
));
cell
=
(
struct
objc_list
*
)
objc_
malloc
(
sizeof
(
struct
objc_list
));
cell
->
head
=
head
;
cell
->
tail
=
tail
;
return
cell
;
...
...
@@ -88,11 +85,11 @@ list_remove_head(struct objc_list** list)
{
struct
objc_list
*
tail
=
(
*
list
)
->
tail
;
/* fetch next */
*
(
*
list
)
=
*
tail
;
/* copy next to list head */
free
(
tail
);
/* free next */
objc_
free
(
tail
);
/* free next */
}
else
/* only one element in list */
{
free
(
*
list
);
objc_free
(
*
list
);
(
*
list
)
=
0
;
}
}
...
...
@@ -144,7 +141,7 @@ list_free(struct objc_list* list)
if
(
list
)
{
list_free
(
list
->
tail
);
free
(
list
);
objc_
free
(
list
);
}
}
#endif __GNU_OBJC_LIST_H
gcc/objc/objects.c
View file @
a1feef75
...
...
@@ -66,19 +66,19 @@ object_dispose(id object)
if
(
_objc_object_dispose
)
(
*
_objc_object_dispose
)(
object
);
else
free
(
object
);
objc_
free
(
object
);
}
return
nil
;
}
id
__objc_object_alloc
(
Class
class
)
{
return
(
id
)
__objc_x
malloc
(
class
->
instance_size
);
return
(
id
)
objc_
malloc
(
class
->
instance_size
);
}
id
__objc_object_dispose
(
id
object
)
{
free
(
object
);
objc_
free
(
object
);
return
0
;
}
...
...
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