MCPcopy Create free account
hub / github.com/apache/qpid-proton / utf82string

Function utf82string

python/cproton.py:188–192  ·  view source on GitHub ↗

Convert char* C strings returned from proton-c into python unicode

(string)

Source from the content-addressed store, hash-verified

186
187
188def utf82string(string):
189 """Convert char* C strings returned from proton-c into python unicode"""
190 if string == ffi.NULL:
191 return None
192 return ffi.string(string).decode('utf8')
193
194
195def bytes2py(b):

Callers 15

pn_pytracerFunction · 0.85
pn_condition_get_nameFunction · 0.85
pn_error_textFunction · 0.85
pn_connection_get_userFunction · 0.85
pn_link_nameFunction · 0.85
pn_terminus_get_addressFunction · 0.85

Calls 2

stringMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected