request for get-bytes (to join get-int, get-string, etc)
Posted: Fri May 08, 2009 2:59 am
I am writing a Postgres module modeled on the MySQL module.
Postgres sometimes sends binary data as a result of queries.
newlisp strings can contain binary data, right?
Although I could probably work out something with (append), would it make sense to have a (get-bytes <i>addr</i> <i>nbytes</i>) function in the base distribution?
My brain is too fried right now to implement it.
Also, it might be more efficient to use the underlying memcpy() function of C in a builtin (get-bytes ...) rather than me implementing it. Although as my mind works, I do see I could do it in a line or two of code. Once I take a break.
Postgres sometimes sends binary data as a result of queries.
newlisp strings can contain binary data, right?
Although I could probably work out something with (append), would it make sense to have a (get-bytes <i>addr</i> <i>nbytes</i>) function in the base distribution?
My brain is too fried right now to implement it.
Also, it might be more efficient to use the underlying memcpy() function of C in a builtin (get-bytes ...) rather than me implementing it. Although as my mind works, I do see I could do it in a line or two of code. Once I take a break.