method
initialize_copy
Ruby latest stable (v2_5_5)
-
0 notes -
Class: Point
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
initialize_copy(p1)
public
Hide source
static VALUE ossl_ec_point_initialize_copy(VALUE self, VALUE other) { EC_POINT *point, *point_new; EC_GROUP *group; VALUE group_v; TypedData_Get_Struct(self, EC_POINT, &ossl_ec_point_type, point_new); if (point_new) ossl_raise(eEC_POINT, "EC::Point already initialized"); GetECPoint(other, point); group_v = rb_obj_dup(rb_attr_get(other, id_i_group)); GetECGroup(group_v, group); point_new = EC_POINT_dup(point, group); if (!point_new) ossl_raise(eEC_POINT, "EC_POINT_dup"); RTYPEDDATA_DATA(self) = point_new; rb_ivar_set(self, id_i_group, group_v); return self; }