View · Search · Index
No registered users in community xowiki
in last 10 minutes

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

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Wed, 31 Oct 2001 21:21:30 +0100

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