From a710a7cf7f2e969d85b6717a670ba26e05493a9d Mon Sep 17 00:00:00 2001 From: florian <florian@freepascal.org> Date: Wed, 28 Dec 2011 17:49:08 +0000 Subject: [PATCH] * translate short int into cshort, patch by barlone, resolves #20956 git-svn-id: trunk@19899 - --- utils/h2pas/h2pas.pas | 4 ++-- utils/h2pas/h2pas.y | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/h2pas/h2pas.pas b/utils/h2pas/h2pas.pas index 834b1e01d7..969efad1f4 100644 --- a/utils/h2pas/h2pas.pas +++ b/utils/h2pas/h2pas.pas @@ -657,7 +657,7 @@ program h2pas; write(outfile,'args:array of const'); (* if variable number of args we must allways pop *) no_pop:=false; - (* Needs 2 declarations, also one without args, because + (* Needs 2 declarations, also one without args, becuase in C you can omit the second parameter. Default parameter doesn't help as that isn't possible with array of const *) NeedEllipsisOverload:=true; @@ -2535,7 +2535,7 @@ begin 73 : begin if UseCTypesUnit then - yyval:=new(presobject,init_id(csint_STR)) + yyval:=new(presobject,init_id(cshort_STR)) else yyval:=new(presobject,init_intid(SMALL_STR)); diff --git a/utils/h2pas/h2pas.y b/utils/h2pas/h2pas.y index 68c9ddab88..003197d345 100644 --- a/utils/h2pas/h2pas.y +++ b/utils/h2pas/h2pas.y @@ -2431,7 +2431,7 @@ special_type_name : SHORT INT { if UseCTypesUnit then - $$:=new(presobject,init_id(csint_STR)) + $$:=new(presobject,init_id(cshort_STR)) else $$:=new(presobject,init_intid(SMALL_STR)); } |