[Mesa-dev] [PATCH 6/9] gallivm: Remove lp_get_module_id.

Emil Velikov emil.l.velikov at gmail.com
Mon Apr 18 12:30:29 UTC 2016


On 18 April 2016 at 10:14, Jose Fonseca <jfonseca at vmware.com> wrote:

> @@ -306,6 +309,15 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
>     if (!gallivm->context)
>        goto fail;
>
> +   gallivm->module_name = NULL;
> +   if (name) {
> +      size_t size = strlen(name) + 1;
> +      gallivm->module_name = MALLOC(size);
> +      if (gallivm->module_name) {
> +         memcpy(gallivm->module_name, name, size);
Since we already use stdup in gallium/aux one could do the same here.
Note: you'll need the lowercase free() in gallivm_free_ir().

-Emil


More information about the mesa-dev mailing list