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
17800ac8
Commit
17800ac8
authored
Sep 16, 2009
by
malosek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setsockopt cleanup in pyzmq.cpp
parent
7a5db604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
pyzmq.cpp
python/pyzmq.cpp
+23
-8
No files found.
python/pyzmq.cpp
View file @
17800ac8
...
@@ -140,14 +140,29 @@ PyObject *socket_setsockopt (socket_t *self, PyObject *args, PyObject *kwdict)
...
@@ -140,14 +140,29 @@ PyObject *socket_setsockopt (socket_t *self, PyObject *args, PyObject *kwdict)
}
}
int
rc
;
int
rc
;
if
(
PyInt_Check
(
optval
))
{
int
val
=
PyInt_AsLong
(
optval
);
switch
(
option
)
{
rc
=
zmq_setsockopt
(
self
->
handle
,
option
,
&
val
,
sizeof
(
int
));
case
ZMQ_HWM
:
}
case
ZMQ_LWM
:
if
(
PyString_Check
(
optval
))
case
ZMQ_SWAP
:
rc
=
zmq_setsockopt
(
self
->
handle
,
option
,
PyString_AsString
(
optval
),
case
ZMQ_AFFINITY
:
PyString_Size
(
optval
));
case
ZMQ_RATE
:
else
{
case
ZMQ_RECOVERY_IVL
:
case
ZMQ_MCAST_LOOP
:
{
int
val
=
PyInt_AsLong
(
optval
);
rc
=
zmq_setsockopt
(
self
->
handle
,
option
,
&
val
,
sizeof
(
int
));
break
;
}
case
ZMQ_IDENTITY
:
case
ZMQ_SUBSCRIBE
:
case
ZMQ_UNSUBSCRIBE
:
rc
=
zmq_setsockopt
(
self
->
handle
,
option
,
PyString_AsString
(
optval
),
PyString_Size
(
optval
));
break
;
default:
rc
=
-
1
;
rc
=
-
1
;
errno
=
EINVAL
;
errno
=
EINVAL
;
}
}
...
...
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