Skip to content

Commit 51d63ee

Browse files
committed
Add missing null char to options
1 parent b6ba4b3 commit 51d63ee

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

Diff for: build.rs

+34-34
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,40 @@ fn generate_lib() {
2626
#![allow(non_camel_case_types)]
2727
#![allow(non_snake_case)]
2828
29-
pub const NNG_OPT_SOCKNAME: &[u8] = b\"socket-name\";
30-
pub const NNG_OPT_RAW: &[u8] = b\"raw\";
31-
pub const NNG_OPT_PROTO: &[u8] = b\"protocol\";
32-
pub const NNG_OPT_PROTONAME: &[u8] = b\"protocol-name\";
33-
pub const NNG_OPT_PEER: &[u8] = b\"peer\";
34-
pub const NNG_OPT_PEERNAME: &[u8] = b\"peer-name\";
35-
pub const NNG_OPT_RECVBUF: &[u8] = b\"recv-buffer\";
36-
pub const NNG_OPT_SENDBUF: &[u8] = b\"send-buffer\";
37-
pub const NNG_OPT_RECVFD: &[u8] = b\"recv-fd\";
38-
pub const NNG_OPT_SENDFD: &[u8] = b\"send-fd\";
39-
pub const NNG_OPT_RECVTIMEO: &[u8] = b\"recv-timeout\";
40-
pub const NNG_OPT_SENDTIMEO: &[u8] = b\"send-timeout\";
41-
pub const NNG_OPT_LOCADDR: &[u8] = b\"local-address\";
42-
pub const NNG_OPT_REMADDR: &[u8] = b\"remote-address\";
43-
pub const NNG_OPT_URL: &[u8] = b\"url\";
44-
pub const NNG_OPT_MAXTTL: &[u8] = b\"ttl-max\";
45-
pub const NNG_OPT_RECVMAXSZ: &[u8] = b\"recv-size-max\";
46-
pub const NNG_OPT_RECONNMINT: &[u8] = b\"reconnect-time-min\";
47-
pub const NNG_OPT_RECONNMAXT: &[u8] = b\"reconnect-time-max\";
48-
pub const NNG_OPT_PEER_GID: &[u8] = b\"ipc:peer-gid\";
49-
pub const NNG_OPT_PEER_PID: &[u8] = b\"ipc:peer-pid\";
50-
pub const NNG_OPT_PEER_UID: &[u8] = b\"ipc:peer-uid\";
51-
pub const NNG_OPT_PEER_ZONEID: &[u8] = b\"ipc:peer-zoneid\";
52-
53-
pub const NNG_OPT_SUB_SUBSCRIBE: &[u8] = b\"sub:subscribe\";
54-
pub const NNG_OPT_SUB_UNSUBSCRIBE: &[u8] = b\"sub:unsubscribe\";
55-
pub const NNG_OPT_SUB_PREFNEW: &[u8] = b\"sub:prefnew\";
56-
57-
pub const NNG_OPT_PAIR1_POLY: &[u8] = b\"pair1:polyamorous\";
58-
59-
pub const NNG_OPT_REQ_RESENDTIME: &[u8] = b\"req:resend-time\";
60-
pub const NNG_OPT_REQ_RESENDTICK: &[u8] = b\"req:resend-tick\";
61-
62-
pub const NNG_OPT_SURVEYOR_SURVEYTIME: &[u8] = b\"surveyor:survey-time\";
29+
pub const NNG_OPT_SOCKNAME: &[u8] = b\"socket-name\0\";
30+
pub const NNG_OPT_RAW: &[u8] = b\"raw\0\";
31+
pub const NNG_OPT_PROTO: &[u8] = b\"protocol\0\";
32+
pub const NNG_OPT_PROTONAME: &[u8] = b\"protocol-name\0\";
33+
pub const NNG_OPT_PEER: &[u8] = b\"peer\0\";
34+
pub const NNG_OPT_PEERNAME: &[u8] = b\"peer-name\0\";
35+
pub const NNG_OPT_RECVBUF: &[u8] = b\"recv-buffer\0\";
36+
pub const NNG_OPT_SENDBUF: &[u8] = b\"send-buffer\0\";
37+
pub const NNG_OPT_RECVFD: &[u8] = b\"recv-fd\0\";
38+
pub const NNG_OPT_SENDFD: &[u8] = b\"send-fd\0\";
39+
pub const NNG_OPT_RECVTIMEO: &[u8] = b\"recv-timeout\0\";
40+
pub const NNG_OPT_SENDTIMEO: &[u8] = b\"send-timeout\0\";
41+
pub const NNG_OPT_LOCADDR: &[u8] = b\"local-address\0\";
42+
pub const NNG_OPT_REMADDR: &[u8] = b\"remote-address\0\";
43+
pub const NNG_OPT_URL: &[u8] = b\"url\0\";
44+
pub const NNG_OPT_MAXTTL: &[u8] = b\"ttl-max\0\";
45+
pub const NNG_OPT_RECVMAXSZ: &[u8] = b\"recv-size-max\0\";
46+
pub const NNG_OPT_RECONNMINT: &[u8] = b\"reconnect-time-min\0\";
47+
pub const NNG_OPT_RECONNMAXT: &[u8] = b\"reconnect-time-max\0\";
48+
pub const NNG_OPT_PEER_GID: &[u8] = b\"ipc:peer-gid\0\";
49+
pub const NNG_OPT_PEER_PID: &[u8] = b\"ipc:peer-pid\0\";
50+
pub const NNG_OPT_PEER_UID: &[u8] = b\"ipc:peer-uid\0\";
51+
pub const NNG_OPT_PEER_ZONEID: &[u8] = b\"ipc:peer-zoneid\0\";
52+
53+
pub const NNG_OPT_SUB_SUBSCRIBE: &[u8] = b\"sub:subscribe\0\";
54+
pub const NNG_OPT_SUB_UNSUBSCRIBE: &[u8] = b\"sub:unsubscribe\0\";
55+
pub const NNG_OPT_SUB_PREFNEW: &[u8] = b\"sub:prefnew\0\";
56+
57+
pub const NNG_OPT_PAIR1_POLY: &[u8] = b\"pair1:polyamorous\0\";
58+
59+
pub const NNG_OPT_REQ_RESENDTIME: &[u8] = b\"req:resend-time\0\";
60+
pub const NNG_OPT_REQ_RESENDTICK: &[u8] = b\"req:resend-tick\0\";
61+
62+
pub const NNG_OPT_SURVEYOR_SURVEYTIME: &[u8] = b\"surveyor:survey-time\0\";
6363
6464
pub const NNG_FLAG_ALLOC: core::ffi::c_int = 1;
6565
pub const NNG_FLAG_NONBLOCK: core::ffi::c_int = 2;

Diff for: src/lib.rs

1.98 KB
Binary file not shown.

0 commit comments

Comments
 (0)