MCPcopy Create free account
hub / github.com/davisking/dlib / str

Method str

dlib/external/pybind11/include/pybind11/pytypes.h:1827–1841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1825}
1826
1827inline str::str(const bytes &b) {
1828 char *buffer = nullptr;
1829 ssize_t length = 0;
1830 if (PyBytes_AsStringAndSize(b.ptr(), &buffer, &length) != 0) {
1831 throw error_already_set();
1832 }
1833 auto obj = reinterpret_steal<object>(PyUnicode_FromStringAndSize(buffer, length));
1834 if (!obj) {
1835 if (PyErr_Occurred()) {
1836 throw error_already_set();
1837 }
1838 pybind11_fail("Could not allocate string object!");
1839 }
1840 m_ptr = obj.release().ptr();
1841}
1842
1843/// \addtogroup pytypes
1844/// @{

Callers 15

start_elementMethod · 0.45
fatal_errorMethod · 0.45
display_aboutMethod · 0.45
resample_datasetFunction · 0.45
line__repr__Function · 0.45
line__str__Function · 0.45
array__str__Function · 0.45
array__repr__Function · 0.45
range__str__Function · 0.45

Calls 3

strClass · 0.85
derivedClass · 0.50
releaseMethod · 0.45

Tested by 15

test_matrix_IOFunction · 0.36
test_onnx_exportFunction · 0.36
test_serializationFunction · 0.36
stack_kernel_testFunction · 0.36
matrix_test1Function · 0.36
static_map_kernel_testFunction · 0.36
test1Function · 0.36
setup_simple_networkFunction · 0.36
setup_dyspnea_networkFunction · 0.36