[ 
https://issues.apache.org/jira/browse/THRIFT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980444#action_12980444
 ] 

John Billings commented on THRIFT-125:
--------------------------------------

I've updated the patch for the current SVN version.  With this patch, I'm 
successfully using thrift under 32-bit OCaml with no problems.

> OCaml libraries don't compile with 32-bit ocaml
> -----------------------------------------------
>
>                 Key: THRIFT-125
>                 URL: https://issues.apache.org/jira/browse/THRIFT-125
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler, OCaml - Library
>         Environment: OCaml 3.10.2 (32-bit)
>            Reporter: Kevin Ballard
>         Attachments: int32patch
>
>
> TBinaryProtocol.ml contains integers outside the range of 32-bit OCaml's 
> native int type (specifically the version_mask and version_1). Additionally, 
> when reading int32s off of the network it returns them as OCaml-native ints. 
> This will behave wrong when an int >= 2**30 is sent over the network, as that 
> will wrap on the OCaml side. I assume the author of this code used 64-bit 
> OCaml, as the code won't even compile under 32-bit OCaml right now.
> In TBinaryProtocol 64-bit ints are kept as int64 objects. The same should be 
> done with 32-bit int values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to