Author: EricStein
Date: 2007-07-08 03:54:59 -0400 (Sun, 08 Jul 2007)
New Revision: 418

Modified:
   trunk/pysoy/src/_datatypes/HashTable.pxi
   trunk/pysoy/src/_datatypes/soy._datatypes.pxd
Log:
Basic __new__ and __dealloc__


Modified: trunk/pysoy/src/_datatypes/HashTable.pxi
===================================================================
--- trunk/pysoy/src/_datatypes/HashTable.pxi    2007-07-08 07:40:34 UTC (rev 
417)
+++ trunk/pysoy/src/_datatypes/HashTable.pxi    2007-07-08 07:54:59 UTC (rev 
418)
@@ -22,5 +22,8 @@
 
      wrapped to allow ease of use by other PySoy classes.
   '''
-  cdef void __new__(self) :
-    return
+  def __new__(self) :
+    self._hashtable = glib.g_hash_table_new_full(glib.g_str_hash, 
glib.g_str_equal, py.PyMem_Free, py.PyMem_Free)
+
+  def __dealloc__(self) :
+    glib.g_hash_table_destroy(self._hashtable)

Modified: trunk/pysoy/src/_datatypes/soy._datatypes.pxd
===================================================================
--- trunk/pysoy/src/_datatypes/soy._datatypes.pxd       2007-07-08 07:40:34 UTC 
(rev 417)
+++ trunk/pysoy/src/_datatypes/soy._datatypes.pxd       2007-07-08 07:54:59 UTC 
(rev 418)
@@ -17,6 +17,7 @@
 #
 # $Id$
 
+cimport py
 cimport glib
 
 cdef class HashTable :

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to