From: Giuseppe Ottaviano Date: Wed, 22 Mar 2017 23:02:41 +0000 (-0700) Subject: Fix typo in Singleton X-Git-Tag: v2017.03.27.00~13 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=16a97089051c76dd187a4a25018965cc44e330e0;p=folly.git Fix typo in Singleton Summary: The "l" in "Haskell" is not a singleton. Also, friends don't let friends rely on operator precedence. Reviewed By: yfeldblum Differential Revision: D4756653 fbshipit-source-id: 7b5360bfc1b26fac06062e4adbfae3a1e477c2dc --- diff --git a/folly/Singleton.cpp b/folly/Singleton.cpp index 7d3eeac6..07ec2666 100644 --- a/folly/Singleton.cpp +++ b/folly/Singleton.cpp @@ -38,11 +38,11 @@ namespace folly { SingletonVault::Type SingletonVault::defaultVaultType() { #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__) bool isPython = dlsym(RTLD_DEFAULT, "Py_Main"); - bool isHaskel = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init"); + bool isHaskell = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init"); bool isJVM = dlsym(RTLD_DEFAULT, "JNI_GetCreatedJavaVMs"); bool isD = dlsym(RTLD_DEFAULT, "_d_run_main"); - return isPython || isHaskel || isJVM || isD ? Type::Relaxed : Type::Strict; + return (isPython || isHaskell || isJVM || isD) ? Type::Relaxed : Type::Strict; #else return Type::Relaxed; #endif