Skip to content

CINTERFACE example needs to be updated #2

Description

@paralogismos

The example on the CINTERFACE page no longer works since the return type of _ml_Time_timeofday has been changed from (Int32.int * int) to Word64.word. The current example code for c_function is:

val gettimeofday : unit -> (Int32.int * int) =
     c_function "SMLNJ-Time" "timeofday"

This should be:

val gettimeofday : unit -> Word64.word =
     c_function "SMLNJ-Time" "timeofday"

It seems that the return type was changed in June of 2019. Here is a Q&A on StackOverflow where this issue came up recently.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions