Comments (3)
I created a simple .h file with just the struct you mentioned above. When I translate this using version 1.4.1 of Chet, I get the following output (as expected):
unit test;
{ This unit is automatically generated by Chet:
https://github.com/neslib/Chet }
{$MINENUMSIZE 4}
interface
const
{$IF Defined(WIN32)}
LIB_TEST = 'Test_win32.dll';
_PU = '';
{$ELSE}
{$MESSAGE Error 'Unsupported platform'}
{$ENDIF}
type
// Forward declarations
Punz_file_info_s = ^unz_file_info_s;
unz_file_info_s = record
version: Integer;
version_needed: Integer;
flag: Integer;
compression_method: Integer;
dosDate: Integer;
crc: Integer;
compressed_size: Integer;
uncompressed_size: Integer;
size_filename: Integer;
size_file_extra: Integer;
size_file_comment: Integer;
disk_num_start: Integer;
internal_fa: Integer;
external_fa: Integer;
tmu_date: Integer;
end;
unz_file_info = unz_file_info_s;
implementation
end.
It correctly translated all the fields in the struct.
Can you create a reproducible scenario, or send me the complete project?
from chet.
Ahh, I think I see what is going on. It would seem the post processing script command CreateDynamicImport(0) is causing the issue. I will look into this. Sorry for the confusion. In my project I had it defined.
from chet.
Ok, I've identified the source of the problem, until I can issue a PR, if you are using post processing, just replace:
RemoveAllLines('external', 2);
with RemoveAllLines('external ', 2);
in function TScriptStringList.CreateDynamicImport(aType: Integer): Boolean;
from chet.
Related Issues (20)
- Post Processing Support HOT 2
- Anonymous Unions HOT 1
- Pulling in extra includes
- Translation Error HOT 3
- Please create a release
- Ok, so....
- [Question] Why no C++? HOT 1
- Error Messages
- Post Processing does not work HOT 3
- Type declarations
- How to include struct tm from C standard library? HOT 2
- Fatal error HOT 1
- error: unknown type name 'bool' HOT 4
- Chet does not support tm time struct from time.h HOT 1
- CreateDynamicImport(0) should not parse comments HOT 3
- CreateDynamicImport(0) does not insert var before function declarations HOT 1
- Generate pointer types for C unions
- Error converting XMLSec library HOT 4
- Justify the project with Godot headers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chet.