Sfoglia il codice sorgente

* Add WinApi call modifier

Michaël Van Canneyt 1 mese fa
parent
commit
d6f307215c

+ 2 - 2
packages/fcl-passrc/src/pastree.pp

@@ -124,7 +124,7 @@ type
                         ccOldFPCCall,ccSafeCall,ccSysCall,ccMWPascal,
                         ccHardFloat,ccSysV_ABI_Default,ccSysV_ABI_CDecl,
                         ccMS_ABI_Default,ccMS_ABI_CDecl,
-                        ccVectorCall);
+                        ccVectorCall, ccWinApi);
   TProcTypeModifier = (ptmOfObject,ptmIsNested,ptmStatic,ptmVarargs,
                        ptmReferenceTo,ptmAsync,ptmFar,ptmCblock);
   TProcTypeModifiers = set of TProcTypeModifier;
@@ -1874,7 +1874,7 @@ const
       ( '', 'Register','Pascal','cdecl','stdcall','OldFPCCall','safecall','SysCall','MWPascal',
                         'HardFloat','SysV_ABI_Default','SysV_ABI_CDecl',
                         'MS_ABI_Default','MS_ABI_CDecl',
-                        'VectorCall');
+                        'VectorCall','WinApi');
   ProcTypeModifiers : Array[TProcTypeModifier] of TPasTreeString =
       ('of Object', 'is nested','static','varargs','reference to','async','far','cblock');
 

+ 1 - 1
packages/fcl-passrc/src/pparser.pp

@@ -755,7 +755,7 @@ Var
   CCNames : Array[TCallingConvention] of String
          = ('','register','pascal','cdecl','stdcall','oldfpccall','safecall','syscall',
            'mwpascal', 'hardfloat','sysv_abi_default','sysv_abi_cdecl',
-           'ms_abi_default','ms_abi_cdecl','vectorcall');
+           'ms_abi_default','ms_abi_cdecl','vectorcall','winapi');
 Var
   C : TCallingConvention;
 

+ 2 - 1
packages/pastojs/src/pas2jsfiler.pp

@@ -466,7 +466,8 @@ const
     'SysV_ABI_CDecl',
     'MS_ABI_Default',
     'MS_ABI_CDecl',
-    'VectorCall'
+    'VectorCall',
+    'WinApi'
     );
 
   PCUProcTypeModifierNames: array[TProcTypeModifier] of string = (