summaryrefslogtreecommitdiff
path: root/cogl/cogl-debug.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-02-10 01:57:32 +0000
committerRobert Bragg <robert@linux.intel.com>2010-02-12 14:05:00 +0000
commit0f5f4e8645d12eb6c5ff99c13503f2380740bb10 (patch)
tree608ac1afdc5924f097bd6e140c6fc887070eb533 /cogl/cogl-debug.c
parent10fa7c7ce9a69b733e4652a51e101a98911d5bb8 (diff)
downloadcogl-0f5f4e8645d12eb6c5ff99c13503f2380740bb10.tar.gz
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so this is a first pass at tidying things up by giving them some consistency. These changes are all consistent with how new code in Cogl is being written, but the style isn't consistently applied across all code yet. There are two parts to this patch; but since each one required a large amount of effort to maintain tidy indenting it made sense to combine the changes to reduce the time spent re indenting the same lines. The first change is to use a consistent style for declaring function prototypes in headers. Cogl headers now consistently use this style for prototypes: return_type cogl_function_name (CoglType arg0, CoglType arg1); Not everyone likes this style, but it seems that most of the currently active Cogl developers agree on it. The second change is to constrain the use of redundant glib data types in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all been replaced with int, unsigned int, float, long, unsigned long and char respectively. When talking about pixel data; use of guchar has been replaced with guint8, otherwise unsigned char can be used. The glib types that we continue to use for portability are gboolean, gint{8,16,32,64}, guint{8,16,32,64} and gsize. The general intention is that Cogl should look palatable to the widest range of C programmers including those outside the Gnome community so - especially for the public API - we want to minimize the number of foreign looking typedefs.
Diffstat (limited to 'cogl/cogl-debug.c')
-rw-r--r--cogl/cogl-debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cogl/cogl-debug.c b/cogl/cogl-debug.c
index 1ee18056..b1b146fd 100644
--- a/cogl/cogl-debug.c
+++ b/cogl/cogl-debug.c
@@ -53,10 +53,10 @@ static const GDebugKey cogl_debug_keys[] = {
{ "disable-atlas", COGL_DEBUG_DISABLE_ATLAS }
};
-static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);
+static const int n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);
#endif /* COGL_ENABLE_DEBUG */
-guint cogl_debug_flags = 0;
+unsigned int cogl_debug_flags = 0;
#ifdef COGL_ENABLE_DEBUG
static gboolean
@@ -73,8 +73,8 @@ cogl_arg_debug_cb (const char *key,
static gboolean
cogl_arg_no_debug_cb (const char *key,
- const char *value,
- gpointer user_data)
+ const char *value,
+ gpointer user_data)
{
cogl_debug_flags &=
~g_parse_debug_string (value,