I'm not sure what the problem is. I assume that it will be side-effected by the C routine. Why can't you pass in a string using rep/string? What is bref-extend supposed to do?