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

Change all T_DATA objects to typed data #349

Merged
merged 9 commits into from
Aug 30, 2020
Merged

Commits on Aug 5, 2020

  1. Convert PG::TypeMap derivations to TypedData objects

    Classic T_DATA objects are deprecated since ruby-2.0.
    On the other hand TypedData objects can be checked more easy and allows some new features.
    larskanis committed Aug 5, 2020
    Configuration menu
    Copy the full SHA
    a5fbe31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8cf705d View commit details
    Browse the repository at this point in the history
  3. Convert PG::Connection and it's temporary objects to TypedData objects

    All T_DATA objects of ruby-pg are based on TypedData_Struct now.
    So we're no longer using deprecated non-typed objects.
    larskanis committed Aug 5, 2020
    Configuration menu
    Copy the full SHA
    3e8d343 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2020

  1. Make PG::Coder and derivations friendly to GC.compact

    This way the VALUE references may be relocated.
    Since self is always referenced indirectly, marking simple coders can be omitted entirely.
    
    This partly reverts 7c1756f which was introduced as a simple fix for GC.compact compatbility.
    larskanis committed Aug 9, 2020
    Configuration menu
    Copy the full SHA
    df958ad View commit details
    Browse the repository at this point in the history
  2. Make PG::TypeMap and derivations friendly to GC.compact

    This way the VALUE references may be relocated.
    
    This partly reverts 7c1756f which was introduced as a simple fix for GC.compact compatbility.
    larskanis committed Aug 9, 2020
    Configuration menu
    Copy the full SHA
    a817bff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c5dcadc View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2020

  1. Add truffleruby-head to travis-CI

    In the hope that the issue with TypedData inheritance is fixed there.
    larskanis committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    a9c9418 View commit details
    Browse the repository at this point in the history
  2. Use RUBY_TYPED_FREE_IMMEDIATELY unconditionally

    It is supported since ruby-2.1 and pg supports ruby-2.2+
    larskanis committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    32a4549 View commit details
    Browse the repository at this point in the history
  3. Add tests for compatibility with GC.compact

    @conninfo is not always defined in a describe context
    So define the constants in a before block and ensure the connection is closed.
    
    Moreover use rspec's :if filter to avoid indention
    "if: false" skips the execution of before, after and it blocks but the describe block is always executed.
    larskanis committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    3b3dc1d View commit details
    Browse the repository at this point in the history