[Xotcl] Re: What functions from xotcl.c could constitute C-API ?

Gustaf Neumann neumann at wu-wien.ac.at
Wed Oct 31 21:21:30 CET 2001


On Wednesday 31 October 2001 21:02, you wrote:
> IOW, if I would like to write a C-level extensions to XOTcl
> (which I desperately need to!) what functions from the
> xotcl.c file should be taken into consideration ?
>
> I know that the public API is (still) not supported
> but I'd need some solution pretty fast.
>
> Any ideas ?

 for the time being, please look into xotcl.h

 the basic functionality, that you will most likely need
 is realized though the following functions. These will be 
 most likely stable over time. Let us know, if you need 
 more functionality as available in xotcl.h

best regards
-gustaf


to create a class
extern int
XOTclCreateClass(Tcl_Interp* in, Tcl_Obj* name, XOTclClass* cl) 

 
to create an object 
extern int
XOTclCreateObject(Tcl_Interp* in, Tcl_Obj* name, XOTclClass* cl)


to access an object/class via its name
extern struct XOTclObject*
XOTclGetObject(Tcl_Interp* in, char* name)

extern struct XOTclClass*
XOTclGetClass(Tcl_Interp* in, char* name)


add a proc:
void
XOTclAddPMethod(Tcl_Interp* in, XOTclObject* obj, char* nm, Tcl_ObjCmdProc* proc,
               ClientData cd, Tcl_CmdDeleteProc* dp) 

Add an insproc:
void
XOTclAddIMethod(Tcl_Interp* in, XOTclClass *cl, char* nm,
		Tcl_ObjCmdProc* proc, ClientData cd, Tcl_CmdDeleteProc* dp)



>
> Thanks,
> Zoran Vasiljevic
> _______________________________________________
> Xotcl mailing list  -  Xotcl at alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl



More information about the Xotcl mailing list