Code

Make C++ - compilable. Mostly remove pointer casting problems. Fix a few places...
[inkscape.git] / src / libcroco / cr-additional-sel.c
index 9f511af06a64ebbd22cefc498369cf0bbca82f4c..80a4767e0c89a3b64b4c0f8e9c7b7a0c66c23a84 100644 (file)
@@ -34,7 +34,7 @@ cr_additional_sel_new (void)
 {
         CRAdditionalSel *result = NULL;
 
-        result = g_try_malloc (sizeof (CRAdditionalSel));
+        result = (CRAdditionalSel *)g_try_malloc (sizeof (CRAdditionalSel));
 
         if (result == NULL) {
                 cr_utils_trace_debug ("Out of memory");
@@ -219,7 +219,7 @@ cr_additional_sel_to_string (CRAdditionalSel * a_this)
                                 guchar *name = NULL;
 
                                 if (cur->content.class_name) {
-                                        name = g_strndup
+                                        name = (guchar *)g_strndup
                                                 (cur->content.class_name->stryng->str,
                                                  cur->content.class_name->stryng->len);
 
@@ -239,7 +239,7 @@ cr_additional_sel_to_string (CRAdditionalSel * a_this)
                                 guchar *name = NULL;
 
                                 if (cur->content.class_name) {
-                                        name = g_strndup
+                                        name = (guchar *)g_strndup
                                                 (cur->content.id_name->stryng->str,
                                                  cur->content.id_name->stryng->len);
 
@@ -295,7 +295,7 @@ cr_additional_sel_to_string (CRAdditionalSel * a_this)
         }
 
         if (str_buf) {
-                result = str_buf->str;
+                result = (guchar *)str_buf->str;
                 g_string_free (str_buf, FALSE);
                 str_buf = NULL;
         }
@@ -319,7 +319,7 @@ cr_additional_sel_one_to_string (CRAdditionalSel *a_this)
                 guchar *name = NULL;
 
                 if (a_this->content.class_name) {
-                        name = g_strndup
+                        name = (guchar *)g_strndup
                                 (a_this->content.class_name->stryng->str,
                                  a_this->content.class_name->stryng->len);
 
@@ -339,7 +339,7 @@ cr_additional_sel_one_to_string (CRAdditionalSel *a_this)
                 guchar *name = NULL;
 
                 if (a_this->content.class_name) {
-                        name = g_strndup
+                        name = (guchar *)g_strndup
                                 (a_this->content.id_name->stryng->str,
                                  a_this->content.id_name->stryng->len);
 
@@ -394,7 +394,7 @@ cr_additional_sel_one_to_string (CRAdditionalSel *a_this)
         }
 
         if (str_buf) {
-                result = str_buf->str;
+                result = (guchar *)str_buf->str;
                 g_string_free (str_buf, FALSE);
                 str_buf = NULL;
         }