"B" effectively turns a parrot STRING into a char**, passing a point to the character array to the function. This is bad because c functions shouldn't be modifying parrot STRINGs. B should really only be used as a IN parameter, not as a OUT or a IN/OUT parameter.
I don't think that NCI really supports OUT parameters except by using UnManagedStruct PMCS. I would advocate changing the B to a V and passing in a UnManagedStruct PMC in that position. You can then call get_string_keyed on the UnManagedStruct PMC to retrieve the pcre error message as a parrot STRING. - dlfunc pcre_function, libpcre, 'pcre_compile', 'ptiB3P' + dlfunc pcre_function, libpcre, 'pcre_compile', 'ptiV3P' I've got a proposed patch to add some safety to "B" signatures that I will attach.