The calling object must be permitted by the master object to do the shadowing. In most installations, an object that defines the function query_prevent_shadow() to return 1 can't be shadowed, and the shadow() function will return 0 instead of ob. shadow() also fails if the calling object tries to shadow a function that was defined as ``nomask'', or if the calling object is already shadowing, is being shadowed, or has an environment. Also the target ob must not be shadowing something else.
If an object A shadows an object B then all call_other() to B will be redirected to A. If object A has not defined the function, then the call will be passed to B. There is only on object that can call functions in B with call_other(), and that is A. Not even object B can call_other() itself. All normal (internal) function calls inside B will however remain internal to B.