-
-* Code that we will drop from Mono, because we do not really need this:
-
- Locking:
-
- 5 G_LOCK
- 5 G_UNLOCK
-
- These are currently only used for the GC-safe hash table, and
- we will be replacing that with a copy of our own hashtable.
-
-Important Groups:
+* Missing code
* Process launching
3 g_shell_quote
3 g_thread_supported
3 g_thread_init
- * String manipulation
- 1 g_filename_from_utf8 [LIMITATION: UTF8 only today]
-
* Miscelaneous
3 g_spaced_primes_closest
-Remove code from Mono:
-
- Multi-threaded aware GHashTable.
- utils/mono-uri.c
-
Macros:
6 G_UNLIKELY
4 G_LIKELY
2 G_STRLOC
+----------------------------------------------------------------------
+
* Unimplemented, not supported currently:
g_unichar_tolower Used for deprecated unmanaged string collation
#define G_STRUCT_OFFSET(p_type,field) \
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
-
+#define EGLIB_STRINGIFY(x) #x
+#define EGLIB_TOSTRING(x) EGLIB_STRINGIFY(x)
+#define G_STRLOC __FILE__ ":" EGLIB_TOSTRING(__LINE__) ":"
/*
* Allocation
*/
return NULL;
}
+RESULT
+test_macros ()
+{
+ char *s = g_strdup (G_STRLOC);
+ char *p = strchr (s, ':');
+ int n;
+
+ if (p == NULL)
+ return FAILED ("Did not find a separator");
+ n = atoi (p+1);
+ if (n <= 0)
+ return FAILED ("did not find a valid line number");
+
+ *p = 0;
+ if (strcmp (s, "string.c") != 0)
+ return FAILED ("This did not store the filename on G_STRLOC");
+
+ g_free (s);
+ return NULL;
+}
+
static Test string_tests [] = {
{"append-speed", test_append_speed},
- {"append_c-speed", test_append_c_speed},
+ {"append_c-speed", test_append_c_speed},
{"ctor+append", test_gstring },
{"ctor+sized", test_sized },
{"truncate", test_truncate },
{"prepend", test_prepend },
{"append_len", test_appendlen },
+ {"macros", test_macros },
{NULL, NULL}
};