Esempio n. 1
0
File: tkWinSend.c Progetto: dgsb/tk
static void
CmdDeleteProc(
    ClientData clientData)
{
    RegisteredInterp *riPtr = (RegisteredInterp *)clientData;

    /*
     * Lock the package structure in memory.
     */

    Tcl_Preserve(clientData);

    /*
     * Revoke the ROT registration.
     */

    RevokeObjectRegistration(riPtr);

    /*
     * Release the registration object.
     */

    riPtr->obj->lpVtbl->Release(riPtr->obj);
    riPtr->obj = NULL;

    Tcl_DeleteAssocData(riPtr->interp, "tkWinSend::ri");

    /*
     * Unlock the package data structure.
     */

    Tcl_Release(clientData);

    ckfree(clientData);
}
Esempio n. 2
0
void
HandleNameToRepMap::exitProc (ClientData clientData)
{
    HandleNameToRepMap *pHandleNameToRepMap =
        static_cast<HandleNameToRepMap *>(clientData);
    Tcl_DeleteAssocData(pHandleNameToRepMap->m_interp, ASSOC_KEY);
}
Esempio n. 3
0
static void VarPtrDeleteProc(ClientData clientData, Tcl_Interp *interp)
{
    register int i;
    Tcl_Obj **varPtr = (Tcl_Obj **) clientData;
    for (i = 0;  i < NUMBER_OF_OBJECT_VARS;  i++) {
	if (varPtr[i]) Tcl_DecrRefCount(varPtr[i]);
    }
    Tcl_DeleteAssocData(interp, VARPTR_KEY);
    ckfree(varPtr);
}
Esempio n. 4
0
int tcl_pmepot_destroy(ClientData nodata, Tcl_Interp *interp,
			int objc, Tcl_Obj *const objv[]) {

  pmepot_data *data;
  if ( objc != 2 ) {
    Tcl_SetResult(interp,"args: handle",TCL_VOLATILE);
    return TCL_ERROR;
  }
  data = Tcl_GetAssocData(interp, Tcl_GetString(objv[1]), 0);
  if ( ! data ) {
    Tcl_SetResult(interp,"Pmepot bug: unable to access handle.",TCL_VOLATILE);
    return TCL_ERROR;
  }

  pmepot_destroy(data);
  Tcl_DeleteAssocData(interp, Tcl_GetString(objv[1]));
  return TCL_OK;
}