Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
tg
Commits
d28bb33f
Commit
d28bb33f
authored
Sep 08, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for old libevent
parent
d60ecd75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
event-old.h
event-old.h
+8
-4
No files found.
event-old.h
View file @
d28bb33f
...
...
@@ -4,13 +4,17 @@
typedef
int
evutil_socket_t
;
static
inline
struct
event
*
event_new
(
struct
event_base
*
base
,
int
fd
,
int
what
,
void
(
*
callback
)(
int
,
short
,
void
*
),
void
*
arg
)
{
struct
event
*
ev
=
malloc
(
sizeof
(
*
ec
));
event_set
(
ev
,
base
,
fd
,
what
,
callback
,
arg
);
struct
event
*
ev
=
malloc
(
sizeof
(
*
ev
));
event_set
(
ev
,
fd
,
what
,
callback
,
arg
);
event_base_set
(
base
,
ev
);
return
ev
;
}
static
inline
struct
event
*
evtimer_new
(
struct
event_base
*
base
,
void
(
*
callback
)(
int
,
short
,
void
*
),
void
*
arg
)
{
struct
event
*
ev
=
malloc
(
sizeof
(
*
ec
));
evtimer_set
(
ev
,
base
,
callback
,
arg
);
struct
event
*
ev
=
malloc
(
sizeof
(
*
ev
));
event_set
(
ev
,
-
1
,
0
,
callback
,
arg
);
event_base_set
(
base
,
ev
);
return
ev
;
}
static
void
event_free
(
struct
event
*
ev
)
{
...
...
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