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

Allow Equal() to be used by different packages in one program. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 29, 2018

  1. Allow Equal() to be used by different packages in one program.

    Some packages may require Equal()'s parameters to be set in a
    particular way that is incompatible with other users within
    the same program. The global configuration parameters can be
    changed and restored, but this could lead to bugs due to race
    conditions. This commit makes the parameters that control
    Equal()'s operation part of a structure, Comparer, for which
    Equal() is now a method. Users can configure their own
    Comparer struct if desired. To preserve the existing package
    interface, the package-level Equals() method will use a
    default Comparer object that relies on pointers to the current
    global configuration parameters (pointers so that the
    operation of the global Equals() function will change
    immediately upon changing the value of any global
    configuration setting).
    gcla committed Jun 29, 2018
    Configuration menu
    Copy the full SHA
    1985ad2 View commit details
    Browse the repository at this point in the history