Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] FFI - Giving Buffer more low-level C functionality #1750

Closed
wants to merge 61 commits into from

Commits on May 23, 2015

  1. Configuration menu
    Copy the full SHA
    c1d2975 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1871fbf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca55494 View commit details
    Browse the repository at this point in the history
  4. buffer: add 0-length NULL pointer Buffer to exports

    Seems useful to add for completeness-sake. Presumably
    useful for i.e. writing the null terminator to a
    null-terminated C array.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    6c32b7e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1f65088 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b8eac6d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a9cdb38 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e338a92 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    af8bff4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0f1e401 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2d54386 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    db39bc2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    34feb80 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    89e7d61 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5e9c2a4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    db6aea9 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    1fdf531 View commit details
    Browse the repository at this point in the history
  18. buffer: use nullptr

    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    ff5a094 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    dea8c4d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4dae6be View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    619d136 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6e07bbc View commit details
    Browse the repository at this point in the history
  23. buffer: add CHECK calls

    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    e6f3262 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    565a1e8 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    66d68ef View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    51e9556 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    2b6ec58 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c84e890 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    001b072 View commit details
    Browse the repository at this point in the history
  30. doc: buffer docs tweaks

    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    86ff08c View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    319e593 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    924da7f View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ed4d220 View commit details
    Browse the repository at this point in the history
  34. buffer: remove static buffer.NULL Buffer

    Should no longer be necessary now that readPointer()
    returns `null` explictly.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    13c77bd View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    61c5c7c View commit details
    Browse the repository at this point in the history
  36. buffer: remove Buffer#isNull()

    Should no longer be necessary now that readPointer*()
    returns JS `null` explicitly.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    a9e8f62 View commit details
    Browse the repository at this point in the history
  37. buffer: remove offset param from address()

    Would make the function simply return `true` for any value >= 1,
    so doesn't really make any sense to keep it around.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    f0cec38 View commit details
    Browse the repository at this point in the history
  38. doc: fix buffer typo

    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    3f0d7a0 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    ea44b75 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    7326597 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    2ace08f View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    e7f8d77 View commit details
    Browse the repository at this point in the history
  43. Revert "doc: add fake memory addresses to old examples"

    This reverts commit 2221318.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    4ee5354 View commit details
    Browse the repository at this point in the history
  44. doc: add fake memory addresses to old examples

    Properly this time…
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    f364f1b View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    13b5d67 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    f451ee7 View commit details
    Browse the repository at this point in the history
  47. test: add Buffer int64 read/write tests

    Mostly copied and refactored from the `ref` tests.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    39d468c View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    0c80b8c View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    1867bd6 View commit details
    Browse the repository at this point in the history
  50. buffer: use memcpy instead of reinterpret_cast

    To avoid aliasing.
    
    @bnoordhuis I believe this is what you meant in:
    nodejs#1750 (comment)
    
    The `test/parallel/test-buffer-pointer.js` test still passes
    after this patch, so apparently it's working correctly.
    TooTallNate committed May 23, 2015
    Configuration menu
    Copy the full SHA
    b929ed0 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2015

  1. Configuration menu
    Copy the full SHA
    0e5cbe5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d6e37cd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    01a3ad3 View commit details
    Browse the repository at this point in the history
  4. buffer: remove __STDC_FORMAT_MACROS

    Ben says it's not necessary.
    TooTallNate committed Jun 1, 2015
    Configuration menu
    Copy the full SHA
    df5bda7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8477e98 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3887226 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2015

  1. buffer: remove "pointer" functions

    These will be moved to static functions in the `ffi` module,
    to remind users of their unsafe nature on the API level.
    TooTallNate committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    c79e4f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91e35b4 View commit details
    Browse the repository at this point in the history
  3. buffer: use base of 10 for the strto(u)ll calls

    Less room for computer error this way
    TooTallNate committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    797ef99 View commit details
    Browse the repository at this point in the history
  4. buffer: change C++-land throw to a CHECK()

    We're already checking for typeof "string"/"number" in
    JS-land. No need for the extra conditional logic.
    TooTallNate committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    475aabb View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2015

  1. buffer: make strto(u)ll usage cross-platform

    The errno EINVAL behavior is a BSDism, and won't work
    cross platform. Instead, pass in the char* endptr value
    and check where it ended up.
    TooTallNate committed Jun 5, 2015
    Configuration menu
    Copy the full SHA
    ce00983 View commit details
    Browse the repository at this point in the history