Re: Embedded API: Getting assembly version via MonoAssemblyName

Jonathan Mitchell <[email protected]>
Newsgroups gmane.comp.gnome.mono.general
Message-ID <[email protected]>
> On 28 Mar 2015, at 13:40, Robert Jordan <[email protected]> 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




_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.