Skip to content
Advertisement

Tag: char

php-ffi: Return type const char* is a string

Why is the result of const char * a string and char * an object „byte-array“? A simple example: returns Removing const from the definition returns: Background A function of a dynamically linked external C library returns binary data which include NULL-bytes. When const is in the definition of the header file the resulting string is not complete = shortened

Advertisement