Branch: Tag:

2014-03-29

2014-03-29 12:57:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Nettle: Specify a base name to precompile.

The internal C-level symbols generated by precompile are now
prefixed with "Nettle_" or "NETTLE_".

391:    INIT    {    const struct ecc_curve *curve = -  (((const struct ECC_Curve_struct *)parent_storage(1))->curve); +  (((const struct Nettle_ECC_Curve_struct *)parent_storage(1))->curve);    if (!curve) Pike_error("No curve selected.\n");    ecc_point_init(&THIS->pub, curve);    ecc_scalar_init(&THIS->key, curve);
400:    EXIT    {    const struct ecc_curve *curve = -  (((const struct ECC_Curve_struct *)parent_storage(1))->curve); +  (((const struct Nettle_ECC_Curve_struct *)parent_storage(1))->curve);    if (!curve) return;    ecc_point_clear(&THIS->pub);    ecc_scalar_clear(&THIS->key);
414:    PIKEFUN string(7bit) name()    {    ref_push_string(MK_STRING("ECDSA(")); -  apply_external(1, f_ECC_Curve_name_fun_num, 0); +  apply_external(1, f_Nettle_ECC_Curve_name_fun_num, 0);    ref_push_string(MK_STRING(")"));    f_add(3);    }
423:    *!    *! Get the elliptic curve that is in use.    */ -  PIKEFUN object(ECC_Curve) get_curve() +  PIKEFUN object(Nettle_ECC_Curve) get_curve()    {    struct external_variable_context loc;    loc.o = Pike_fp->current_object;