Posted to tcl by apw at Tue Aug 07 15:40:33 GMT 2007view raw

  1. /*
  2. * tclItclOO.c --
  3. *
  4. * This file contains the object-system Itcl core (NB: not Tcl_Obj, but ::oo)
  5. *
  6. * Copyright (c) 2007 by Arnulf P. Wiedemann
  7. *
  8. * See the file "license.terms" for information on usage and redistribution of
  9. * this file, and for a DISCLAIMER OF ALL WARRANTIES.
  10. *
  11. * RCS: @(#) $Id: tclItclOO.c,v 1.0 2007/07/30 14:53:08 apw Exp $
  12. */
  13.  
  14. #include "tclInt.h"
  15. #include "tclOOInt.h"
  16.  
  17. ^L
  18. /*
  19. * ----------------------------------------------------------------------
  20. *
  21. * Itcl_PublicObjectCmd, Itcl_PrivateObjectCmd --
  22. *
  23. * Main entry point for object invokations. The Public* and Private*
  24. * wrapper functions are just thin wrappers round the main ObjectCmd
  25. * function that does call chain creation, management and invokation.
  26. *
  27. * ----------------------------------------------------------------------
  28. */
  29. int
  30. Itcl_ConstructorObjectCmd(
  31. Tcl_Object oPtr,
  32. Tcl_Interp *interp,
  33. Tcl_Class clsPtr,
  34. int objc,
  35. Tcl_Obj *const *objv)
  36. {
  37. return TclOOObjectCmdCore((Object *)oPtr, interp, objc, objv, PUBLIC_METHOD,
  38. &((Object *)oPtr)->publicContextCache, (Class *)clsPtr);
  39. }
  40. ^L
  41. int
  42. Itcl_PublicObjectCmd(
  43. ClientData clientData,
  44. Tcl_Interp *interp,
  45. Tcl_Class clsPtr,
  46. int objc,
  47. Tcl_Obj *const *objv)
  48. {
  49. Object *oPtr = (Object *)clientData;
  50. int result;
  51.  
  52. result = TclOOObjectCmdCore(oPtr, interp, objc, objv, PUBLIC_METHOD,
  53. &oPtr->publicContextCache, (Class *)clsPtr);
  54. return result;
  55. }
  56. ^L
  57. int
  58. Itcl_PrivateObjectCmd(
  59. ClientData clientData,
  60. Tcl_Interp *interp,
  61. Tcl_Class clsPtr,
  62. int objc,
  63. Tcl_Obj *const *objv)
  64. {
  65. Object *oPtr = (Object *)clientData;
  66. int result;
  67.  
  68. result = TclOOObjectCmdCore(oPtr, interp, objc, objv, PRIVATE_METHOD,
  69. &oPtr->publicContextCache, (Class *)clsPtr);
  70. return result;
  71. }
  72.  

Comments

Posted by apw at Tue Aug 07 15:49:08 GMT 2007 [text] [code]

Itcl_ConstructorObjectCmd is no longer needed, was a leftover!