Re: wrapping C code - my exercise in incompetence.
- Posted by ssallen Mar 13, 2013
- 3002 views
Hello again, here is my get_aiString_Sequence method.
function get_aiString_sequence(atom loc) sequence aiStr aiStr = AI_STRING aiStr[1] = peek4u(loc) -- t_size if aiStr[1] < 1 then aiStr[2] = "bad length" else aiStr[2] = peek_string(loc+4) -- string end if if length(aiStr[2]) != aiStr[1] then -- Handle: length doesn't match! end if return aiStr end function