Create ctypes char * from a python string Parameters ---------- string : string type python string Returns ------- str : c_char_p A char pointer that can be passed to C API
(string)
| 71 | |
| 72 | |
| 73 | def c_str(string): |
| 74 | """Create ctypes char * from a python string |
| 75 | Parameters |
| 76 | ---------- |
| 77 | string : string type |
| 78 | python string |
| 79 | |
| 80 | Returns |
| 81 | ------- |
| 82 | str : c_char_p |
| 83 | A char pointer that can be passed to C API |
| 84 | """ |
| 85 | return ctypes.c_char_p(string.encode("utf-8")) |
| 86 | |
| 87 | |
| 88 | def c_array(ctype, values): |
no test coverage detected