Package: glib

Function glib:bytes-new-from-string

Lambda List

glib:bytes-new-from-string (str)

Arguments

str -- a string

Return Value

The g:bytes instance for the string, or nil, if str is not a string.

Details

Creates a new g:bytes instance for the given string. This function allocates the memory for the foreign string and automatically frees it when the last reference of the g:bytes instance is released.

Notes

This function is not included in the C library. This convenience function correctly handles the memory for foreign strings in the Lisp library.
 

See also

2026-02-08