Closed daurnimator closed 6 years ago
Right. It should just pushlstring and leave out the second return, there is the length operator after all... Then I think the value returned as second return is wrong anyway, as per the libpq documentation it includes the trailing '\0'. So it should do lua_pushlstring(L, *p, to_length -1).
This is fixed in the head branch. Thanks for bringing it to my attention.
Should use pushlstring to save a
strlen
.Also, I'm curious why you return the length as a 2nd return at all?