neslib / Chet

C Header Translator for Delphi
BSD 2-Clause "Simplified" License
204 stars 43 forks source link

CreateDynamicImport(0) should not parse comments #33

Open michkowalczuk opened 6 months ago

michkowalczuk commented 6 months ago

Static (default) mode in Chet is more stable than dynamic. Example: In static mode Chet returns code with comments correctly moved from C header. In my case this comment contains string:

/**
The outer loop to be set for the face. If the
function succeeds, this loop will be deallocated.
*/

After using CreateDynamicImport(0) Chet generates the following method, which is a bug: succeeds := GetProcAddress(aDLLHandle, 'succeeds');

jarroddavis68 commented 6 months ago

Yup, I'm working on fixing this. Big update to post processing coming.

Another issue I recently discovered too is advanced records, it will try to do the same. So I have to figure out these corner cases.

michkowalczuk commented 6 months ago

Please update this thread once you've fixed it.

jarroddavis68 commented 6 months ago

Please update this thread once you've fixed it.

Will do.