From 0dde0ce4588cf4d14b914616404e1bad17149704 Mon Sep 17 00:00:00 2001 From: minhqdao Date: Mon, 11 Mar 2024 00:19:43 +0545 Subject: [PATCH] Use allocatable field --- src/version_f.f90 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/version_f.f90 b/src/version_f.f90 index 8dfbc8b..0834ee7 100644 --- a/src/version_f.f90 +++ b/src/version_f.f90 @@ -5,9 +5,7 @@ module version_f public :: try_satisfy type :: version_t - integer :: major - integer :: minor - integer :: patch + character(:), allocatable :: string end type type :: comparator_t @@ -59,15 +57,11 @@ subroutine parse_comp_set(this) allocate (this%comps(0)) comp%op = '>' - comp%version%major = 1 - comp%version%minor = 0 - comp%version%patch = 1 + comp%version%string = '1' this%comps = [this%comps, comp] comp%op = '<' - comp%version%major = 2 - comp%version%minor = 1 - comp%version%patch = 0 + comp%version%string = '2' this%comps = [this%comps, comp] end end