[Mono-list] Embedded API: Getting assembly version via MonoAssemblyName
Jonathan Mitchell
jonathan at mugginsoft.com
Sun Mar 29 10:40:20 UTC 2015
> On 28 Mar 2015, at 13:40, Robert Jordan <robertj at gmx.net> wrote:
>
> There are a couple of public mono_assembly_name_* functions in
> assembly.h, including mono_assembly_name_new () which is probably
> allocating an opaque MonoAssemblyName struct for you.
>
I think that function takes an argument which is subsequently parsed, which is not really the requirement here:
MonoAssemblyName*
mono_assembly_name_new (const char *name)
{
MonoAssemblyName *aname = g_new0 (MonoAssemblyName, 1);
if (mono_assembly_name_parse (name, aname))
return aname;
g_free (aname);
return NULL;
}
MonoAssemblyName went opaque here:
http://www.mono-project.com/archived/mono_runtime_api_changes/
Maybe need a patch like so, that is if the runtime is taking them:
MonoAssemblyName*
mono_assembly_name_create ()
{
MonoAssemblyName *aname = g_new0 (MonoAssemblyName, 1);
return aname;
}
Jonathan
More information about the Mono-list
mailing list