Ticket #374: Parrot_store_global_s.patch

File Parrot_store_global_s.patch, 0.8 KB (added by octo, 13 years ago)

Patch for Parrot_store_global_s

  • src/global.c

    diff --git a/src/global.c b/src/global.c
    index e096f23..f0fc160 100644
    a b  
    667667        ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val)) 
    668668{ 
    669669    ASSERT_ARGS(Parrot_store_global_s) 
    670     PMC * const ns = Parrot_make_namespace_keyed_str(interp, 
    671                                          Parrot_get_ctx_HLL_namespace(interp), 
    672                                          str_key); 
     670    PMC *ns; 
     671     
     672    if (str_key == NULL) 
     673        ns = Parrot_get_ctx_HLL_namespace (interp); 
     674    else 
     675        ns = Parrot_make_namespace_keyed_str(interp, 
     676                Parrot_get_ctx_HLL_namespace(interp), 
     677                str_key); 
    673678 
    674679    Parrot_store_global_n(interp, ns, globalname, val); 
    675680