chiark / gitweb /
better core algorithm selection and new core alg suites
[chiark-tcl.git] / hbytes / ulongs.c
index e8ea9a839001731d0df5e1a4dda6ff0f873757f7..4652fd695c2816029fe8cd3f391a89aca76d22dd 100644 (file)
@@ -20,6 +20,12 @@ int do_ulong_add(ClientData cd, Tcl_Interp *ip,
   return TCL_OK;
 }
   
+int do_ulong_multiply(ClientData cd, Tcl_Interp *ip,
+                     uint32_t a, uint32_t b, uint32_t *result) {
+  *result= a * b;
+  return TCL_OK;
+}
+  
 int do_ulong_subtract(ClientData cd, Tcl_Interp *ip,
                      uint32_t a, uint32_t b, uint32_t *result) {
   *result= a - b;
@@ -251,7 +257,7 @@ static void ulong_t_dup(Tcl_Obj *src, Tcl_Obj *dup) {
 
 static void ulong_t_ustr(Tcl_Obj *o) {
   uint32_t val;
-  char buf[11];
+  char buf[9];
 
   val= *(const uint32_t*)&o->internalRep.longValue;