You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@alexcrichton like mentioned in #696 I would like to add a safe wrapper for git_trace_set. since it does not take a custom payload I can only imagine doing this via a global variable to store the user callback. this requires Mutex protection which in turn requires lazy_static
a) is that ok for you to add as a dependency?
b) do we have an alternative way to do this?
c) do we say such stuff belongs into user code or a utility crate?
The text was updated successfully, but these errors were encountered:
I think this could probably be done with an AtomicUsize rather than a mutex? (since we'd just cast a function pointer to a usize and put the value in the global AtomicUsize)
I think this could probably be done with an AtomicUsize rather than a mutex? (since we'd just cast a function pointer to a usize and put the value in the global AtomicUsize)
damn you are right - casting the usize to a pointer - that feels so dirty! I love it - PR incoming
@alexcrichton like mentioned in #696 I would like to add a safe wrapper for
git_trace_set
. since it does not take a custom payload I can only imagine doing this via a global variable to store the user callback. this requires Mutex protection which in turn requireslazy_static
a) is that ok for you to add as a dependency?
b) do we have an alternative way to do this?
c) do we say such stuff belongs into user code or a utility crate?
The text was updated successfully, but these errors were encountered: