On Saturday 19 July 2008 11:19:27 chromatic wrote: > Poking at strings directly seems unclean; do we need to add another > function to src/packfile.c to return a packed packfile as a C string, > and then create the string directly here in get_string()?
I agree, poking around in STRING internals isn't clean, or fun. (Also, the quoted code gets a nice segfault later on because the encoding and charset weren't initialized.) I don't know that a separate function is necessary... I could just allocate the buffer and then wrap a STRING around that afterwards. I will make that change once I've sorted out a couple of other issues, probably later today. As an aside, what's with PARROT_BINARY_CHARSET? It sounds like that's what my strings need to be using for holding binary data, but the comparison function always returns 0. Am I misunderstanding what the binary charset plugin is for? It doesn't look like it's used very often. -- Mark