Studio:Can STRIDE marshal both data and pointers?: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
m (Text replace - 'Category:Pointers' to 'Category:Studio:Pointers')
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
''When memory is allocated inside a C function, can STRIDE marshal the data and the pointer to the memory-allocated data so that it can later be freed?''
STRIDE does not marshal both the pointer value and the data. You have to pick one of the two. If a pointer is defined as void or the scl_ptr_opaque pragma is applied the pointer value is marshaled otherwise the data the pointer points to is marshaled. Opaque pointers can be passed to other functions or helper function to retrieve the data to which it points.
 
[[Category:Studio:Pointers]]
STRIDE does not marshal both the pointer value and the data; you can pass an opaque pointer then use a helper function to retrieve the data to which it points.
 
In Perl, use the <tt>$main::ascript -> </tt>syntax.
 
 
[[Category:Scripting]]

Latest revision as of 00:41, 21 August 2009

STRIDE does not marshal both the pointer value and the data. You have to pick one of the two. If a pointer is defined as void or the scl_ptr_opaque pragma is applied the pointer value is marshaled otherwise the data the pointer points to is marshaled. Opaque pointers can be passed to other functions or helper function to retrieve the data to which it points.