> A C program would record the amount of memory it allocates, because there's
> no way to retrieve this information. A traditional method is to use zero or
> null as the last element (which is why Nim cstrings end with 0), but it hurts
> speed.
I am not sure what you are trying to tell me. I know strings in C end with a 0
character. I have already written code for this in C, it is easy:
GLint length;
glGetShaderiv(vs, GL_INFO_LOG_LENGTH, &length);
char *msg = malloc(length);
glGetShaderInfoLog(vs, length, NULL, msg);
...
free(msg);
Run
Or was there something else you wanted to say that I am missing?