Skip to content

Commit

Permalink
bug fix. TemplateParamPointer for primitive type T = T* (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
wavewave committed Aug 16, 2023
1 parent 59deb27 commit 7c06b4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fficxx/src/FFICXX/Generate/Code/Primitive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ tmplArgToCTypVar _ (Arg (TemplateAppMove _) v) = (R.CTStar R.CTVoid, R.sname v)
tmplArgToCTypVar _ (Arg (TemplateType _) v) = (R.CTStar R.CTVoid, R.sname v)
tmplArgToCTypVar CPrim (Arg (TemplateParam t) v) = (R.CTSimple (R.sname t), R.sname v)
tmplArgToCTypVar NonCPrim (Arg (TemplateParam t) v) = (R.CTSimple (R.CName [R.NamePart t, R.NamePart "_p"]), R.sname v)
tmplArgToCTypVar CPrim (Arg (TemplateParamPointer t) v) = (R.CTSimple (R.sname t), R.sname v)
tmplArgToCTypVar CPrim (Arg (TemplateParamPointer t) v) = (R.CTStar (R.CTSimple (R.sname t)), R.sname v)
tmplArgToCTypVar NonCPrim (Arg (TemplateParamPointer t) v) = (R.CTSimple (R.CName [R.NamePart t, R.NamePart "_p"]), R.sname v)
tmplArgToCTypVar _ _ = error "tmplArgToCTypVar: undefined"

Expand Down

0 comments on commit 7c06b4b

Please sign in to comment.