chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] C_callback_adjust_stack


From: Alex Stuart
Subject: [Chicken-users] C_callback_adjust_stack
Date: Sun, 13 Apr 2014 16:38:15 -0600

The manual is unclear on how I should use the C_callback_adjust_stack
function. Can anybody explain it to me more clearly?

>From the manual:

"Callbacks defined with define-external will perform appropriate
adjustments automatically, but if you invoke C_callback manually, you
should perform a C_callback_adjust_stack to make sure the internal
limits are set properly. ptr should point to some data object on the
stack and size is the number of words contained in the data object (or
some estimate). The call will make sure the limits are adjusted so that
the value pointed to by ptr is located in the stack."

If I already know that "ptr" is on the stack, why would I need to make
sure of it? If I don't already know that, where do I get "ptr" from?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]