arturo-lang / arturo

Simple, expressive & portable programming language for efficient scripting
http://arturo-lang.io
MIT License
673 stars 29 forks source link

[Helpers/bignums] fix warning with `newInt`, `newFloat`, `newRat` #1261

Open github-actions[bot] opened 10 months ago

github-actions[bot] commented 10 months ago

[Helpers/bignums] fix warning with newInt, newFloat, newRat this triggers the following warning:

Warning: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated]

https://github.com/arturo-lang/arturo/blob/49464413934fcc8c96a381a1867144cafda9b3d9/src/helpers/bignums.nim#L89


func newInt*(x: culong): Int =
    # TODO(Helpers/bignums) fix warning with `newInt`, `newFloat`, `newRat`
    #  this triggers the following warning:
    #  ```
    #  Warning: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated]
    #  ```
    #  labels: 3rd-party, enhancement
    new(result, finalizeInt)
    mpz_init_set_ui(result[], x)

ndex 31a42cbaf7..e043e4cdb7 100644
++ b/src/helpers/database.nim

305a64fb2b1ae58b46dd5bb34d369f7a1793e175

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.