Function
fli
replace-foreign-object to from &key nelems => pointer
A foreign object or a pointer to a foreign object.
A foreign object or a pointer to a foreign object.
An integer.
A pointer to the object specified by from.
replace-foreign-object copies the contents of the foreign object specified by from into another foreign object specified by to. Block copying on an array of elements can also be performed by specifying the number of elements to copy using thenelems keyword. from-obj contains the integers from 0 to 9. The objectto-obj contains random values. Thereplace-foreign-object function is then used to copy the contents offrom-obj intoto-obj.
(setf from-obj
(fli:allocate-foreign-object
:type :int
:nelems 10
:initial-contents
'(0 1 2 3 4 5 6 7 8 9)))
(setf to-obj
(fli:allocate-foreign-object
:type :int
:nelems 10 ))
(fli:replace-foreign-object to-obj from-obj :nelems 10)