Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
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
libzmq
Commits
616fbeff
Commit
616fbeff
authored
Mar 26, 2017
by
evoskuil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: insufficient use of const complicates calling.
parent
7a4c8024
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
zmq.h
include/zmq.h
+4
-4
msg.cpp
src/msg.cpp
+3
-3
msg.hpp
src/msg.hpp
+3
-3
zmq.cpp
src/zmq.cpp
+4
-4
No files found.
include/zmq.h
View file @
616fbeff
...
...
@@ -266,11 +266,11 @@ ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);
ZMQ_EXPORT
int
zmq_msg_move
(
zmq_msg_t
*
dest
,
zmq_msg_t
*
src
);
ZMQ_EXPORT
int
zmq_msg_copy
(
zmq_msg_t
*
dest
,
zmq_msg_t
*
src
);
ZMQ_EXPORT
void
*
zmq_msg_data
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
size_t
zmq_msg_size
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_more
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_get
(
zmq_msg_t
*
msg
,
int
property
);
ZMQ_EXPORT
size_t
zmq_msg_size
(
const
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_more
(
const
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_get
(
const
zmq_msg_t
*
msg
,
int
property
);
ZMQ_EXPORT
int
zmq_msg_set
(
zmq_msg_t
*
msg
,
int
property
,
int
optval
);
ZMQ_EXPORT
const
char
*
zmq_msg_gets
(
zmq_msg_t
*
msg
,
const
char
*
property
);
ZMQ_EXPORT
const
char
*
zmq_msg_gets
(
const
zmq_msg_t
*
msg
,
const
char
*
property
);
/******************************************************************************/
/* 0MQ socket definition. */
...
...
src/msg.cpp
View file @
616fbeff
...
...
@@ -46,7 +46,7 @@
typedef
char
zmq_msg_size_check
[
2
*
((
sizeof
(
zmq
::
msg_t
)
==
sizeof
(
zmq_msg_t
))
!=
0
)
-
1
];
bool
zmq
::
msg_t
::
check
()
bool
zmq
::
msg_t
::
check
()
const
{
return
u
.
base
.
type
>=
type_min
&&
u
.
base
.
type
<=
type_max
;
}
...
...
@@ -355,7 +355,7 @@ void *zmq::msg_t::data ()
}
}
size_t
zmq
::
msg_t
::
size
()
size_t
zmq
::
msg_t
::
size
()
const
{
// Check the validity of the message.
zmq_assert
(
check
());
...
...
@@ -375,7 +375,7 @@ size_t zmq::msg_t::size ()
}
}
unsigned
char
zmq
::
msg_t
::
flags
()
unsigned
char
zmq
::
msg_t
::
flags
()
const
{
return
u
.
base
.
flags
;
}
...
...
src/msg.hpp
View file @
616fbeff
...
...
@@ -82,7 +82,7 @@ namespace zmq
shared
=
128
};
bool
check
();
bool
check
()
const
;
int
init
();
int
init
(
void
*
data
,
size_t
size_
,
...
...
@@ -101,8 +101,8 @@ namespace zmq
int
move
(
msg_t
&
src_
);
int
copy
(
msg_t
&
src_
);
void
*
data
();
size_t
size
();
unsigned
char
flags
();
size_t
size
()
const
;
unsigned
char
flags
()
const
;
void
set_flags
(
unsigned
char
flags_
);
void
reset_flags
(
unsigned
char
flags_
);
metadata_t
*
metadata
()
const
;
...
...
src/zmq.cpp
View file @
616fbeff
...
...
@@ -674,17 +674,17 @@ void *zmq_msg_data (zmq_msg_t *msg_)
return
((
zmq
::
msg_t
*
)
msg_
)
->
data
();
}
size_t
zmq_msg_size
(
zmq_msg_t
*
msg_
)
size_t
zmq_msg_size
(
const
zmq_msg_t
*
msg_
)
{
return
((
zmq
::
msg_t
*
)
msg_
)
->
size
();
}
int
zmq_msg_more
(
zmq_msg_t
*
msg_
)
int
zmq_msg_more
(
const
zmq_msg_t
*
msg_
)
{
return
zmq_msg_get
(
msg_
,
ZMQ_MORE
);
}
int
zmq_msg_get
(
zmq_msg_t
*
msg_
,
int
property_
)
int
zmq_msg_get
(
const
zmq_msg_t
*
msg_
,
int
property_
)
{
const
char
*
fd_string
;
...
...
@@ -735,7 +735,7 @@ const char *zmq_msg_group (zmq_msg_t *msg_)
// Get message metadata string
const
char
*
zmq_msg_gets
(
zmq_msg_t
*
msg_
,
const
char
*
property_
)
const
char
*
zmq_msg_gets
(
const
zmq_msg_t
*
msg_
,
const
char
*
property_
)
{
zmq
::
metadata_t
*
metadata
=
((
zmq
::
msg_t
*
)
msg_
)
->
metadata
();
const
char
*
value
=
NULL
;
...
...
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