Esempio n. 1
0
 def get_str(self):
     # pylint: disable=duplicate-code
     resp_str = ffi.new("char *[1]")
     self.pimpl.get(resp_str)
     if resp_str[0] == ffi.NULL:
         return None
     return ffi.string(resp_str[0]).decode("utf-8")
Esempio n. 2
0
 def payload_str(self):
     s = ffi.new('char *[1]')
     if self.pimpl.has_payload():
         self.pimpl.get_json(ffi.cast('char**', s))
         return ffi.string(s[0])
     else:
         return None
Esempio n. 3
0
 def get_str(self):
     # pylint: disable=duplicate-code
     resp_str = ffi.new("char *[1]")
     self.pimpl.get(resp_str)
     if resp_str[0] == ffi.NULL:
         return None
     return ffi.string(resp_str[0]).decode("utf-8")
Esempio n. 4
0
 def payload_str(self):
     s = ffi.new('char *[1]')
     if self.pimpl.has_payload():
         self.pimpl.get_payload_json(ffi.cast('char**', s))
         return ffi.string(s[0])
     else:
         return None
Esempio n. 5
0
 def get_str(self):
     payload_str = ffi.new("char *[1]")
     self.pimpl.flux_rpc_get(payload_str)
     if payload_str[0] == ffi.NULL:
         return None
     return ffi.string(payload_str[0]).decode("utf-8")
Esempio n. 6
0
 def payload_str(self):
     string = ffi.new("char *[1]")
     if self.pimpl.has_payload():
         self.pimpl.get_string(ffi.cast("char**", string))
         return ffi.string(string[0]).decode("utf-8")
     return None
Esempio n. 7
0
 def topic(self):
     topic_string = ffi.new("char *[1]")
     self.pimpl.get_topic(topic_string)
     return ffi.string(topic_string[0]).decode("utf-8")
Esempio n. 8
0
def msg_typestr(msg_type):
    # the returned string is guaranteed to be ascii
    return ffi.string(raw.flux_msg_typestr(msg_type)).decode("ascii")
Esempio n. 9
0
 def get_str(self):
     payload_str = ffi.new("char *[1]")
     self.pimpl.flux_rpc_get(payload_str)
     if payload_str[0] == ffi.NULL:
         return None
     return ffi.string(payload_str[0]).decode("utf-8")
Esempio n. 10
0
 def topic(self):
     topic_string = ffi.new("char *[1]")
     self.pimpl.get_topic(topic_string)
     return ffi.string(topic_string[0]).decode("utf-8")
Esempio n. 11
0
 def topic(self):
     s = ffi.new('char *[1]')
     self.pimpl.get_topic(s)
     return ffi.string(s[0])
Esempio n. 12
0
def msg_typestr(t):
    return ffi.string(raw.flux_msg_typestr(t))
Esempio n. 13
0
 def get_str(self):
     j_str = ffi.new("char *[1]")
     self.pimpl.get(j_str)
     if j_str[0] == ffi.NULL:
         return None
     return ffi.string(j_str[0]).decode("utf-8")
Esempio n. 14
0
 def get_str(self):
     j_str = ffi.new("char *[1]")
     self.pimpl.get(j_str)
     if j_str[0] == ffi.NULL:
         return None
     return ffi.string(j_str[0]).decode("utf-8")
Esempio n. 15
0
 def topic(self):
     s = ffi.new('char *[1]')
     self.pimpl.get_topic(s)
     return ffi.string(s[0])
Esempio n. 16
0
def msg_typestr(t):
    return ffi.string(raw.flux_msg_typestr(t))
Esempio n. 17
0
 def get_str(self):
     j_str = ffi.new('char *[1]')
     self.pimpl.get(j_str)
     return ffi.string(j_str[0])
Esempio n. 18
0
def msg_typestr(msg_type):
    # the returned string is guaranteed to be ascii
    return ffi.string(raw.flux_msg_typestr(msg_type)).decode("ascii")
Esempio n. 19
0
 def get_str(self):
     j_str = ffi.new('char *[1]')
     self.pimpl.get(j_str)
     return ffi.string(j_str[0])
Esempio n. 20
0
 def payload_str(self):
     string = ffi.new("char *[1]")
     if self.pimpl.has_payload():
         self.pimpl.get_string(ffi.cast("char**", string))
         return ffi.string(string[0]).decode("utf-8")
     return None
Esempio n. 21
0
 def topic(self):
     topic_string = ffi.new('char *[1]')
     self.pimpl.get_topic(topic_string)
     return ffi.string(topic_string[0])