Skip to content

Commit ef65f7b

Browse files
committed
Handle Unix/Windows long integer differences
1 parent 61769b3 commit ef65f7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitStmt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private void VisitBinaryOperator(BinaryOperator binaryOperator)
4545
if (binaryOperator.IsShiftOp || binaryOperator.IsShiftAssignOp)
4646
{
4747
// RHS of shift operation in C# must be an int
48-
if (binaryOperator.RHS.Type.Kind is CXType_Int or CXType_Long)
48+
if (binaryOperator.RHS.Type.Kind is CXType_Int || (binaryOperator.RHS.Type.Kind is CXType_Long && !_config.GenerateUnixTypes))
4949
{
5050
Visit(binaryOperator.RHS);
5151
}

0 commit comments

Comments
 (0)