Re: wrapping C code - my exercise in incompetence.

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 
 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu