[Mono-list] Linux.NET

Dan Lewis dihlewis@yahoo.co.uk
Sat, 13 Apr 2002 16:08:30 +0100 (BST)


 --- Serge <serge@wildwestsoftware.com> wrote:
> glib is a dependency, for instance.
> For some time I'm looking at porting Mono to CE and Symbian.
> It's not easy at all, partially because of dependencies.
> These OSes are just different.
> Currently, I think Mono is more desktop-oriented.

Oops, forgot about that one. I was probably painting the picture a little
rosier than it actually is :)

Is there a case for ditching glib? We use barely a quarter of it (see attached
file for a simple function breakdown). The data structures and string routines
are probably the most useful - Paolo's hashtable patch shows that they can be
lifted out safely. Assertions and reporting could similarly be lifted.

GLib unicode support seems a little awkward for Mono's needs -- we could really
do with our own manipulation functions (I'm just finishing off some C# encoding
implementations at the moment :) And memory management eventually needs to be
closer to the garbage collector.

That leaves a few system functions -- most notably gmodule.

Anyway, just an idea.

Dan.



DATA STRUCTURES

ghash.h :
    48 g_hash_table_lookup
    48 g_hash_table_insert
    38 g_hash_table_new
    19 g_hash_table_destroy
    13 g_hash_table_foreach
     6 g_direct_hash
     6 g_hash_table_remove
     4 g_hash_table_new_full
     4 g_str_hash
     3 g_hash_table_lookup_extended
     2 g_hash_table_size
     2 g_direct_equal
     2 g_hash_table_replace
     1 g_hash_table_foreach_steal
     1 g_hash_table_foreach_remove
     1 g_int_equal
     1 g_hash_table_steal
gslist.h :
     9 g_slist_prepend
     7 g_slist_free
     6 g_slist_length
     3 g_slist_reverse
glist.h :
    13 g_list_append
    10 g_list_free
    10 g_list_prepend
     9 g_list_length
     2 g_list_remove_link
     2 g_list_index
     2 g_list_insert_sorted
     1 g_list_sort
     1 g_list_foreach
     1 g_list_find
garray.h :
    35 g_ptr_array_index
    15 g_ptr_array_add
    10 g_ptr_array_new
     9 g_ptr_array_free
     5 g_array_index
     4 g_array_append_val
     3 g_array_free
     3 g_array_new
     3 g_ptr_array_remove_fast
     1 g_array_insert_val

STRING SUPPORT

gstrfuncs.h :
   156 g_strdup_printf
    43 g_strdup
    20 g_strconcat
     5 g_memdup
     1 g_strfreev
     1 g_strsplit
     1 g_strndup
     1 g_strcasecmp
gstring.h :
    81 g_string_append
    46 g_string_sprintfa
    30 g_string_append_c
    23 g_string_new
    21 g_string_free
gunicode.h :
     4 g_unichar_type
     4 g_utf8_to_utf16
     2 g_utf16_to_utf8
     1 g_unichar_isspace
     1 g_unichar_tolower
     1 g_unichar_digit_value
     1 g_unichar_isxdigit
     1 g_unichar_iscntrl
     1 g_unichar_isupper
     1 g_unichar_isalpha
     1 g_unichar_ispunct
     1 g_unichar_isdigit
     1 g_unichar_islower
     1 g_unichar_toupper

ERROR SUPPORT

gmessages.h :
   325 g_assert
   270 g_message
   134 g_warning
    87 g_assert_not_reached
    87 g_error
    86 g_print
    32 g_return_val_if_fail
    12 g_return_if_fail
     2 g_printerr
     1 g_log_set_handler
gerror.h :
     2 g_error_free

MEMORY

gmem.h :
   296 g_free
    83 g_new0
    43 g_malloc
    23 g_new
    11 g_malloc0
     8 g_realloc
     1 g_chunk_new
     1 g_renew
     1 g_mem_chunk_new

MODULES

gmodule.h :
     2 g_module_open
     1 g_module_symbol
     1 g_module_build_path

MISCELLANEOUS

gprimes.h :
     1 g_spaced_primes_closest
gtimer.h :
     1 g_timer_stop
     1 g_timer_new
     1 g_timer_destroy
     1 g_timer_elapsed
     1 g_timer_start
gutils.h :
     4 g_snprintf
     2 g_path_get_basename
     1 g_get_current_dir
     1 g_path_get_dirname
     1 g_getenv
gfileutils.h :
     6 g_file_test



__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com