Revision: 65576
          http://sourceforge.net/p/brlcad/code/65576
Author:   starseeker
Date:     2015-07-11 21:23:32 +0000 (Sat, 11 Jul 2015)
Log Message:
-----------
Replace Tcl_HashTable with bu_hash_tbl (needs testing)

Modified Paths:
--------------
    brlcad/trunk/src/librt/tree.c

Modified: brlcad/trunk/src/librt/tree.c
===================================================================
--- brlcad/trunk/src/librt/tree.c       2015-07-11 20:58:06 UTC (rev 65575)
+++ brlcad/trunk/src/librt/tree.c       2015-07-11 21:23:32 UTC (rev 65576)
@@ -140,8 +140,8 @@
     struct directory *dp = NULL;
     size_t shader_len=0;
     struct rt_i *rtip;
-    Tcl_HashTable *tbl = (Tcl_HashTable *)client_data;
-    Tcl_HashEntry *entry;
+    struct bu_hash_tbl *tbl = (struct bu_hash_tbl *)client_data;
+    struct bu_hash_entry *entry;
     matp_t inv_mat;
     struct bu_attribute_value_set avs;
     struct bu_attribute_value_pair *avpp;
@@ -233,8 +233,8 @@
        /* enter critical section */
        bu_semaphore_acquire(RT_SEM_RESULTS);
 
-       entry = Tcl_CreateHashEntry(tbl, key, &newentry);
-       Tcl_SetHashValue(entry, (ClientData)inv_mat);
+       entry = bu_hash_tbl_add(tbl, (const unsigned char *)key, strlen(key), 
&newentry);
+       bu_set_hash_value(entry, (unsigned char *)inv_mat);
 
        /* leave critical section */
        bu_semaphore_release(RT_SEM_RESULTS);
@@ -703,7 +703,8 @@
 {
     struct soltab *stp;
     struct region *regp;
-    Tcl_HashTable *tbl;
+    struct bu_hash_tbl *tbl;
+
     size_t prev_sol_count;
     int i;
     int num_attrs=0;
@@ -719,8 +720,7 @@
 
     if (argc <= 0) return -1;  /* FAIL */
 
-    BU_ALLOC(tbl, Tcl_HashTable);
-    Tcl_InitHashTable(tbl, TCL_ONE_WORD_KEYS);
+    tbl = bu_hash_tbl_create(1);
     rtip->Orca_hash_tbl = (void *)tbl;
 
     prev_sol_count = rtip->nsolids;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to