@@ -69,6 +69,12 @@ asn1time_to_time(const ASN1_TIME *time)
69
69
return rb_funcall2 (rb_cTime , rb_intern ("utc" ), 6 , argv );
70
70
}
71
71
72
+ static VALUE
73
+ asn1time_to_time_i (VALUE arg )
74
+ {
75
+ return asn1time_to_time ((ASN1_TIME * )arg );
76
+ }
77
+
72
78
void
73
79
ossl_time_split (VALUE time , time_t * sec , int * days )
74
80
{
@@ -136,6 +142,12 @@ num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
136
142
return ai ;
137
143
}
138
144
145
+ static VALUE
146
+ asn1integer_to_num_i (VALUE arg )
147
+ {
148
+ return asn1integer_to_num ((ASN1_INTEGER * )arg );
149
+ }
150
+
139
151
/********/
140
152
/*
141
153
* ASN1 module
@@ -325,7 +337,7 @@ decode_int(unsigned char* der, long length)
325
337
p = der ;
326
338
if (!(ai = d2i_ASN1_INTEGER (NULL , & p , length )))
327
339
ossl_raise (eASN1Error , NULL );
328
- ret = rb_protect (( VALUE ( * )( VALUE )) asn1integer_to_num ,
340
+ ret = rb_protect (asn1integer_to_num_i ,
329
341
(VALUE )ai , & status );
330
342
ASN1_INTEGER_free (ai );
331
343
if (status ) rb_jump_tag (status );
@@ -365,7 +377,7 @@ decode_enum(unsigned char* der, long length)
365
377
p = der ;
366
378
if (!(ai = d2i_ASN1_ENUMERATED (NULL , & p , length )))
367
379
ossl_raise (eASN1Error , NULL );
368
- ret = rb_protect (( VALUE ( * )( VALUE )) asn1integer_to_num ,
380
+ ret = rb_protect (asn1integer_to_num_i ,
369
381
(VALUE )ai , & status );
370
382
ASN1_ENUMERATED_free (ai );
371
383
if (status ) rb_jump_tag (status );
@@ -427,7 +439,7 @@ decode_time(unsigned char* der, long length)
427
439
p = der ;
428
440
if (!(time = d2i_ASN1_TIME (NULL , & p , length )))
429
441
ossl_raise (eASN1Error , NULL );
430
- ret = rb_protect (( VALUE ( * )( VALUE )) asn1time_to_time ,
442
+ ret = rb_protect (asn1time_to_time_i ,
431
443
(VALUE )time , & status );
432
444
ASN1_TIME_free (time );
433
445
if (status ) rb_jump_tag (status );
0 commit comments