Critcl::cproc arguments and return values must be typed. There are no default arguments or ways to pass more sophisticated data items than int/long/float/double /char*. The return type can be "string", meaning that it is a Tcl_Alloc'ed char* which will be Tcl_Free'd at some point.
You can, however, use Tcl_Obj* arguments (with no refcount change), or return it (in which case it will be decref'ed). If the first parameter to critcl::cproc has type Tcl_Interp* that will be passed in. Lastly, if the return type is ok, then an integer return code of type TCL_OK or TCL_ERROR is expected and will be processed as usual (errors must set the result, so it is most likely that you'll also want to specify the Tcl_Interp* argument).
The critcl::cdata procedure can be used to create a Tcl byte array object, and associated Tcl command:
critcl::cdata hi “hi there!”
% hi hi there!
When using critcl::ccommand (for example, to invoke existing C functions in a library) it is possible to specify the clientdata and delproc arguments to the generated Tcl_CreateObjCommand function. To do this, use the optional -clientdata and/or -delproc before the argument specifying the C code.
For example, the following is from the Critcl wrapping of the BLT busy widget: