getCallingDLL              package:base              R Documentation

_C_o_m_p_u_t_e _D_L_L _f_o_r _N_a_t_i_v_e _I_n_t_e_r_f_a_c_e _C_a_l_l

_D_e_s_c_r_i_p_t_i_o_n:

     This is an internal function that is called from R's C code to
     determine the enclosing name space of a
     '.C'/'.Call'/'.Fortran'/'.External' call which has no 'PACKAGE'
     argument. If the call has been made from a function within a name
     space, then we can find the DLL associated with that name space.
     The purpose of this is to avoid having to use the 'PACKAGE'
     argument in these native calls and so better support versions of
     packages.

     This is an internal function that may be migrated to internal C
     code in the future and so should not be used by R programmers.

_U_s_a_g_e:

     getCallingDLL(f = sys.function(-1), doStop = FALSE)
     getCallingDLLe(e)

_A_r_g_u_m_e_n_t_s:

       f: the function whose name space and DLL are to be found. By
          default, this is the current function being called which is
          the one in which the native routine is being invoked.

  doStop: a logical value indicating whether failure to find a name
          space and/or DLL is an error ('TRUE') or not ('FALSE').  The
          default is 'FALSE' so that when this is called because there
          is no 'PACKAGE' argument in a '.C', '.Call', '.Fortran',
          '.External' call,  no error occurs and the regular lookup is
          performed by searching all DLLs in order.

       e: an environment.

_S_e_e _A_l_s_o:

     '.C', '.Call', '.Fortran', '.External'

_E_x_a_m_p_l_e_s:

     if(exists("ansari.test"))
        getCallingDLL(ansari.test)

