From 0a5a202053fd333b2c11362bbd394545db7fe15f Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Fri, 15 May 2020 15:12:17 -0500 Subject: [PATCH] Fix template regex in convert_swig Fixes #999 --- include/trick/swig/cast_as.i | 2 +- libexec/trick/convert_swig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trick/swig/cast_as.i b/include/trick/swig/cast_as.i index ac89c18a..96537d97 100644 --- a/include/trick/swig/cast_as.i +++ b/include/trick/swig/cast_as.i @@ -7,7 +7,7 @@ %define %trick_cast_as(TYPE, NAME) %inline %{ -/* caseAs##NAME casts incoming ptrs as the target type. Takes incoming object and tests if it +/* castAs##NAME casts incoming ptrs as the target type. Takes incoming object and tests if it is a compatible type, a void *, or an integer (raw pointer value). If it is any of these types it returns the incoming value as a pointer to the outgoing type. The integer conversion is used by the input processor to associate named allocations in the diff --git a/libexec/trick/convert_swig b/libexec/trick/convert_swig index 7003c0af..906a464c 100755 --- a/libexec/trick/convert_swig +++ b/libexec/trick/convert_swig @@ -88,7 +88,7 @@ my $class_def = qr/(?:class|struct)\s* # keyword class or st (?:\{|:(?!\:)) # { or punctuator : /sx ; my $template_def = qr/template\s* # keyword template - <[^>]+>\s* # template parameters + <.*?>\s* # template parameters (?:class|struct) # keyword class or struct \s+[_A-Za-z]\w*\s* # class name /sx ;