/*
*/
-/*
- * dgram-socket create <local> => <sockid>
- * dgram-socket close <sockid>
- * dgram-socket transmit <sockid> <data> <remote>
- * dgram-socket on-receive <sockid> [<script>]
- * calls, effectively, eval <script> [list <data> <remote-addr> <socket>]
- * if script not supplied, cancel
- */
#include "tables.h"
#include "hbytes.h"
return TCL_OK;
}
+void tabledataid_disposing(void *val, IdDataTable *tab) {
+ int ix;
+
+ ix= *(int*)val;
+ if (ix==-1) return;
+ assert(tab->a[ix] == val);
+ tab->a[ix]= 0;
+ *(int*)val= -1;
+}
+
int pat_iddata(Tcl_Interp *ip, Tcl_Obj *o, void **rv, IdDataTable *tab) {
int rc, ix;
void *r;
char buf[75];
const char *prefix;
- prefix= o->internalRep.twoPtrValue.ptr2;
+ prefix= ((IdDataTable*)o->internalRep.twoPtrValue.ptr1)->prefix;
snprintf(buf,sizeof(buf), "%lu",
*(unsigned long*)o->internalRep.twoPtrValue.ptr2);
obj_updatestr_vstringls(o,
(char*)0);
}
-Tcl_ObjType tabledataid_ntype = {
+Tcl_ObjType tabledataid_nearlytype = {
"tabledataid",
tabledataid_nt_free, tabledataid_nt_dup,
tabledataid_nt_ustr, tabledataid_nt_sfa