Author: ArcRiley
Date: 2008-12-31 19:19:16 -0500 (Wed, 31 Dec 2008)
New Revision: 1395

Added:
   trunk/pysoy/include/g.pxd
Removed:
   trunk/pysoy/include/glib.pxd
Modified:
   trunk/pysoy/include/soy._core.pxd
   trunk/pysoy/include/soy._datatypes.pxd
   trunk/pysoy/include/soy._internals.pxd
   trunk/pysoy/include/soy.scenes.pxd
   trunk/pysoy/src/_datatypes/HashTable.pym
   trunk/pysoy/src/_internals/AsyncQueue.pym
   trunk/pysoy/src/_internals/PointerSet.pym
   trunk/pysoy/src/_internals/_getQueue.pym
Log:
Ticket #970 :
  * renaming glib to g


Copied: trunk/pysoy/include/g.pxd (from rev 1393, trunk/pysoy/include/glib.pxd)
===================================================================
--- trunk/pysoy/include/g.pxd                           (rev 0)
+++ trunk/pysoy/include/g.pxd   2009-01-01 00:19:16 UTC (rev 1395)
@@ -0,0 +1,92 @@
+# GLib Declarations
+#
+# Copyright (C) 2006,2007,2008,2009 PySoy Group
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU Affero General Public License as published
+#  by the Free Software Foundation, either version 3 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU Affero General Public License for more details.
+#
+#  You should have received a copy of the GNU Affero General Public License
+#  along with this program; if not, see http://www.gnu.org/licenses
+#
+# $Id$
+
+
+cdef extern from "glib.h" nogil :
+  ctypedef void*           gpointer
+  ctypedef void*           gconstpointer
+  ctypedef char            gchar
+  ctypedef short           gshort
+  ctypedef long            glong
+  ctypedef int             gint
+  ctypedef gint            gboolean
+  ctypedef unsigned char   guchar
+  ctypedef unsigned short  gushort
+  ctypedef unsigned long   gulong
+  ctypedef unsigned int    guint
+  ctypedef float           gfloat
+  ctypedef double          gdouble
+
+  cdef     gpointer  g_malloc          ( gulong )
+  cdef     void      g_free            ( gpointer )
+
+  ctypedef struct GThreadFunctions :
+    void* none
+
+  ctypedef struct GHashTable :
+    void* none
+
+  ctypedef struct GAsyncQueue :
+    void* none
+
+  ctypedef gboolean  GHRFunc           ( gpointer, gpointer, gpointer )
+  ctypedef gint      GCompareFunc      ( gconstpointer, gconstpointer )
+  ctypedef gint      GCompareDataFunc  ( gconstpointer, gconstpointer, 
gpointer )
+  ctypedef gboolean  GEqualFunc        ( gconstpointer, gconstpointer )
+  ctypedef void      GDestroyNotify    ( gpointer )
+  ctypedef void      GFunc             ( gpointer, gpointer )
+  ctypedef guint     GHashFunc         ( gconstpointer )
+  ctypedef void      GHFunc            ( gpointer, gpointer, gpointer )
+  ctypedef void      GFreeFunc         ( gpointer )
+  ctypedef gchar*    GTranslateFunc    ( gchar*, gpointer )
+
+  cdef gboolean    g_str_equal                    ( gconstpointer, 
gconstpointer )
+  cdef guint       g_str_hash                     ( gconstpointer )
+  cdef gboolean    g_int_equal                    ( gconstpointer, 
gconstpointer )
+  cdef guint       g_int_hash                     ( gconstpointer )
+  cdef gboolean    g_direct_equal                 ( gconstpointer, 
gconstpointer )
+  cdef guint       g_direct_hash                  ( gconstpointer )
+
+  cdef GHashTable* g_hash_table_new               ( GHashFunc, GEqualFunc )
+  cdef GHashTable* g_hash_table_new_full          ( GHashFunc, GEqualFunc, 
GDestroyNotify, GDestroyNotify )
+  cdef void        g_hash_table_destroy           ( GHashTable* )
+  cdef void        g_hash_table_insert            ( GHashTable*, gpointer, 
gpointer )
+  cdef void        g_hash_table_replace           ( GHashTable*, gpointer, 
gpointer )
+  cdef gboolean    g_hash_table_remove            ( GHashTable*, gconstpointer 
)
+  cdef void        g_hash_table_remove_all        ( GHashTable* )
+  cdef gboolean    g_hash_table_steal             ( GHashTable*, gconstpointer 
)
+  cdef void        g_hash_table_steal_all         ( GHashTable* )
+  cdef gpointer    g_hash_table_lookup            ( GHashTable*, gconstpointer 
)
+  cdef gboolean    g_hash_table_lookup_extended   ( GHashTable*, 
gconstpointer, gpointer*, gpointer* )
+  cdef void        g_hash_table_foreach           ( GHashTable*, GHFunc, 
gpointer )
+  cdef gpointer    g_hash_table_find              ( GHashTable*, GHRFunc, 
gpointer )
+  cdef guint       g_hash_table_foreach_remove    ( GHashTable*, GHRFunc, 
gpointer )
+  cdef guint       g_hash_table_foreach_steal     ( GHashTable*, GHRFunc, 
gpointer )
+  cdef guint       g_hash_table_size              ( GHashTable* )
+  cdef GHashTable* g_hash_table_ref               ( GHashTable* )
+  cdef void        g_hash_table_unref             ( GHashTable* )
+
+  cdef     void      g_thread_init     ( GThreadFunctions* )
+
+  cdef GAsyncQueue*  g_async_queue_new            ( )
+  cdef void          g_async_queue_unref          ( GAsyncQueue* )
+  cdef void          g_async_queue_push           ( GAsyncQueue*, gpointer )
+  cdef gpointer      g_async_queue_pop            ( GAsyncQueue* )
+
+  cdef gchar*      g_strdup                       ( gchar* )


Property changes on: trunk/pysoy/include/g.pxd
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:mergeinfo
   + 

Deleted: trunk/pysoy/include/glib.pxd
===================================================================
--- trunk/pysoy/include/glib.pxd        2008-12-31 23:56:16 UTC (rev 1394)
+++ trunk/pysoy/include/glib.pxd        2009-01-01 00:19:16 UTC (rev 1395)
@@ -1,92 +0,0 @@
-# GLib Declarations
-#
-# Copyright (C) 2006,2007,2008,2009 PySoy Group
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU Affero General Public License as published
-#  by the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU Affero General Public License for more details.
-#
-#  You should have received a copy of the GNU Affero General Public License
-#  along with this program; if not, see http://www.gnu.org/licenses
-#
-# $Id$
-
-
-cdef extern from "glib.h" nogil :
-  ctypedef void*           gpointer
-  ctypedef void*           gconstpointer
-  ctypedef char            gchar
-  ctypedef short           gshort
-  ctypedef long            glong
-  ctypedef int             gint
-  ctypedef gint            gboolean
-  ctypedef unsigned char   guchar
-  ctypedef unsigned short  gushort
-  ctypedef unsigned long   gulong
-  ctypedef unsigned int    guint
-  ctypedef float           gfloat
-  ctypedef double          gdouble
-
-  cdef     gpointer  g_malloc          ( gulong )
-  cdef     void      g_free            ( gpointer )
-
-  ctypedef struct GThreadFunctions :
-    void* none
-
-  ctypedef struct GHashTable :
-    void* none
-
-  ctypedef struct GAsyncQueue :
-    void* none
-
-  ctypedef gboolean  GHRFunc           ( gpointer, gpointer, gpointer )
-  ctypedef gint      GCompareFunc      ( gconstpointer, gconstpointer )
-  ctypedef gint      GCompareDataFunc  ( gconstpointer, gconstpointer, 
gpointer )
-  ctypedef gboolean  GEqualFunc        ( gconstpointer, gconstpointer )
-  ctypedef void      GDestroyNotify    ( gpointer )
-  ctypedef void      GFunc             ( gpointer, gpointer )
-  ctypedef guint     GHashFunc         ( gconstpointer )
-  ctypedef void      GHFunc            ( gpointer, gpointer, gpointer )
-  ctypedef void      GFreeFunc         ( gpointer )
-  ctypedef gchar*    GTranslateFunc    ( gchar*, gpointer )
-
-  cdef gboolean    g_str_equal                    ( gconstpointer, 
gconstpointer )
-  cdef guint       g_str_hash                     ( gconstpointer )
-  cdef gboolean    g_int_equal                    ( gconstpointer, 
gconstpointer )
-  cdef guint       g_int_hash                     ( gconstpointer )
-  cdef gboolean    g_direct_equal                 ( gconstpointer, 
gconstpointer )
-  cdef guint       g_direct_hash                  ( gconstpointer )
-
-  cdef GHashTable* g_hash_table_new               ( GHashFunc, GEqualFunc )
-  cdef GHashTable* g_hash_table_new_full          ( GHashFunc, GEqualFunc, 
GDestroyNotify, GDestroyNotify )
-  cdef void        g_hash_table_destroy           ( GHashTable* )
-  cdef void        g_hash_table_insert            ( GHashTable*, gpointer, 
gpointer )
-  cdef void        g_hash_table_replace           ( GHashTable*, gpointer, 
gpointer )
-  cdef gboolean    g_hash_table_remove            ( GHashTable*, gconstpointer 
)
-  cdef void        g_hash_table_remove_all        ( GHashTable* )
-  cdef gboolean    g_hash_table_steal             ( GHashTable*, gconstpointer 
)
-  cdef void        g_hash_table_steal_all         ( GHashTable* )
-  cdef gpointer    g_hash_table_lookup            ( GHashTable*, gconstpointer 
)
-  cdef gboolean    g_hash_table_lookup_extended   ( GHashTable*, 
gconstpointer, gpointer*, gpointer* )
-  cdef void        g_hash_table_foreach           ( GHashTable*, GHFunc, 
gpointer )
-  cdef gpointer    g_hash_table_find              ( GHashTable*, GHRFunc, 
gpointer )
-  cdef guint       g_hash_table_foreach_remove    ( GHashTable*, GHRFunc, 
gpointer )
-  cdef guint       g_hash_table_foreach_steal     ( GHashTable*, GHRFunc, 
gpointer )
-  cdef guint       g_hash_table_size              ( GHashTable* )
-  cdef GHashTable* g_hash_table_ref               ( GHashTable* )
-  cdef void        g_hash_table_unref             ( GHashTable* )
-
-  cdef     void      g_thread_init     ( GThreadFunctions* )
-
-  cdef GAsyncQueue*  g_async_queue_new            ( )
-  cdef void          g_async_queue_unref          ( GAsyncQueue* )
-  cdef void          g_async_queue_push           ( GAsyncQueue*, gpointer )
-  cdef gpointer      g_async_queue_pop            ( GAsyncQueue* )
-
-  cdef gchar*      g_strdup                       ( gchar* )

Modified: trunk/pysoy/include/soy._core.pxd
===================================================================
--- trunk/pysoy/include/soy._core.pxd   2008-12-31 23:56:16 UTC (rev 1394)
+++ trunk/pysoy/include/soy._core.pxd   2009-01-01 00:19:16 UTC (rev 1395)
@@ -17,8 +17,8 @@
 #
 # $Id$
 
+cimport g
 cimport gl
-cimport glib
 cimport ode
 cimport ogg
 cimport py

Modified: trunk/pysoy/include/soy._datatypes.pxd
===================================================================
--- trunk/pysoy/include/soy._datatypes.pxd      2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/include/soy._datatypes.pxd      2009-01-01 00:19:16 UTC (rev 
1395)
@@ -17,9 +17,9 @@
 #
 # $Id$
 
+cimport g
 cimport al
 cimport gl
-cimport glib
 cimport ode
 cimport py
 cimport stdio
@@ -84,7 +84,7 @@
                                                           void*, int )
 
 cdef class HashTable :
-  cdef glib.GHashTable*           _hashtable
+  cdef g.GHashTable*              _hashtable
   cdef void                       _insert               ( self, char*, 
                                                           float )         nogil
   cdef float                      _lookup               ( self, char* )   nogil

Modified: trunk/pysoy/include/soy._internals.pxd
===================================================================
--- trunk/pysoy/include/soy._internals.pxd      2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/include/soy._internals.pxd      2009-01-01 00:19:16 UTC (rev 
1395)
@@ -17,10 +17,10 @@
 #
 # $Id$
 
-cimport glib
+cimport g
 
 cdef class AsyncQueue :
-  cdef glib.GAsyncQueue* _asyncqueue
+  cdef g.GAsyncQueue*    _asyncqueue
   cdef void              _push         ( self, void* )                    nogil
   cdef object            _pop          ( self )
 
@@ -80,12 +80,12 @@
 
 
 cdef class PointerSet :
-  cdef glib.GHashTable*  _hashtable
+  cdef g.GHashTable*     _hashtable
   cdef void              _insert       ( self, void* )                    nogil
   cdef int               _has_key      ( self, void* )                    nogil
   cdef int               _remove       ( self, void* )                    nogil
   cdef void              _empty        ( self )                           nogil
-  cdef void              _foreach      ( self, glib.GHFunc, void* )       nogil
+  cdef void              _foreach      ( self, g.GHFunc, void* )          nogil
 
 
 # Extension-level C functions

Modified: trunk/pysoy/include/soy.scenes.pxd
===================================================================
--- trunk/pysoy/include/soy.scenes.pxd  2008-12-31 23:56:16 UTC (rev 1394)
+++ trunk/pysoy/include/soy.scenes.pxd  2009-01-01 00:19:16 UTC (rev 1395)
@@ -17,8 +17,8 @@
 #
 # $Id$
 
+cimport g
 cimport gl
-cimport glib
 cimport ode
 cimport py
 cimport math

Modified: trunk/pysoy/src/_datatypes/HashTable.pym
===================================================================
--- trunk/pysoy/src/_datatypes/HashTable.pym    2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/src/_datatypes/HashTable.pym    2009-01-01 00:19:16 UTC (rev 
1395)
@@ -29,11 +29,12 @@
   #
 
   def __cinit__(self) :
-    self._hashtable = glib.g_hash_table_new_full(glib.g_str_hash, 
glib.g_str_equal, glib.g_free, glib.g_free)
+    self._hashtable = g.g_hash_table_new_full(g.g_str_hash, g.g_str_equal, 
+                                              g.g_free, g.g_free)
 
 
   def __dealloc__(self) :
-    glib.g_hash_table_destroy(self._hashtable)
+    g.g_hash_table_destroy(self._hashtable)
 
 
   def insert(self, key, data) :
@@ -63,26 +64,26 @@
   #
 
   cdef void _insert(self, char* key, float data) nogil :
-    cdef glib.gchar* k
-    cdef glib.gpointer d
-    d = glib.g_malloc(sizeof(float))
+    cdef g.gchar* k
+    cdef g.gpointer d
+    d = g.g_malloc(sizeof(float))
     (<float*>d)[0] = data
-    k = glib.g_strdup(key)
-    glib.g_hash_table_insert(self._hashtable, k, d)
+    k = g.g_strdup(key)
+    g.g_hash_table_insert(self._hashtable, k, d)
 
 
   cdef float _lookup(self, char* _key) nogil :
     cdef float* _f
-    _f = <float*> glib.g_hash_table_lookup(self._hashtable, _key)
+    _f = <float*> g.g_hash_table_lookup(self._hashtable, _key)
     if _f == NULL :
       return 0.0
     return _f[0]
 
 
   cdef int _has_key(self, char* key) nogil :
-    cdef glib.gpointer k, d
-    return glib.g_hash_table_lookup_extended(self._hashtable, key, &k, &d)
+    cdef g.gpointer k, d
+    return g.g_hash_table_lookup_extended(self._hashtable, key, &k, &d)
 
   
   cdef int _remove(self, char* key) nogil :
-    return glib.g_hash_table_remove(self._hashtable, key)
+    return g.g_hash_table_remove(self._hashtable, key)

Modified: trunk/pysoy/src/_internals/AsyncQueue.pym
===================================================================
--- trunk/pysoy/src/_internals/AsyncQueue.pym   2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/src/_internals/AsyncQueue.pym   2009-01-01 00:19:16 UTC (rev 
1395)
@@ -17,7 +17,7 @@
 #
 # $Id$
 
-cimport glib
+cimport g
 cimport py
 
 cdef class AsyncQueue :
@@ -32,10 +32,10 @@
   #
   
   def __cinit__(self) :
-    self._asyncqueue = glib.g_async_queue_new()
+    self._asyncqueue = g.g_async_queue_new()
 
   def __dealloc__(self) :
-    glib.g_async_queue_unref(self._asyncqueue)
+    g.g_async_queue_unref(self._asyncqueue)
 
   ############################################################################
   #
@@ -43,11 +43,11 @@
   #
   
   cdef void _push(self, void* data) nogil :
-    glib.g_async_queue_push(self._asyncqueue, data)
+    g.g_async_queue_push(self._asyncqueue, data)
 
   cdef object _pop(self) :
     cdef void* _obj
     with nogil:
-      _obj = glib.g_async_queue_pop(self._asyncqueue)
+      _obj = g.g_async_queue_pop(self._asyncqueue)
     py.Py_DECREF(<object> _obj)
     return <object> _obj

Modified: trunk/pysoy/src/_internals/PointerSet.pym
===================================================================
--- trunk/pysoy/src/_internals/PointerSet.pym   2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/src/_internals/PointerSet.pym   2009-01-01 00:19:16 UTC (rev 
1395)
@@ -29,10 +29,10 @@
   #
   
   def __cinit__(self) :
-    self._hashtable = glib.g_hash_table_new(glib.g_direct_hash, 
glib.g_direct_equal)
+    self._hashtable = g.g_hash_table_new(g.g_direct_hash, g.g_direct_equal)
 
   def __dealloc__(self) :
-    glib.g_hash_table_destroy(self._hashtable)
+    g.g_hash_table_destroy(self._hashtable)
 
   ############################################################################
   #
@@ -40,17 +40,17 @@
   #
   
   cdef void _insert(self, void* key) nogil :
-    glib.g_hash_table_insert(self._hashtable, key, NULL)
+    g.g_hash_table_insert(self._hashtable, key, NULL)
 
   cdef int _has_key(self, void* key) nogil :
-    cdef glib.gpointer k, d
-    return glib.g_hash_table_lookup_extended(self._hashtable, key, &k, &d)
+    cdef g.gpointer k, d
+    return g.g_hash_table_lookup_extended(self._hashtable, key, &k, &d)
   
   cdef int _remove(self, void* key) nogil :
-    return glib.g_hash_table_remove(self._hashtable, key)
+    return g.g_hash_table_remove(self._hashtable, key)
 
   cdef void _empty(self) nogil :
-    glib.g_hash_table_remove_all(self._hashtable)
+    g.g_hash_table_remove_all(self._hashtable)
 
-  cdef void _foreach(self, glib.GHFunc function, void* user_data) nogil :
-    glib.g_hash_table_foreach(self._hashtable, function, user_data)
+  cdef void _foreach(self, g.GHFunc function, void* user_data) nogil :
+    g.g_hash_table_foreach(self._hashtable, function, user_data)

Modified: trunk/pysoy/src/_internals/_getQueue.pym
===================================================================
--- trunk/pysoy/src/_internals/_getQueue.pym    2008-12-31 23:56:16 UTC (rev 
1394)
+++ trunk/pysoy/src/_internals/_getQueue.pym    2009-01-01 00:19:16 UTC (rev 
1395)
@@ -17,7 +17,7 @@
 #
 # $Id$
 
-glib.g_thread_init(<glib.GThreadFunctions*> 0)
+g.g_thread_init(<g.GThreadFunctions*> 0)
 
 cdef AsyncQueue _queue
 _queue = AsyncQueue()

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to