Skip to content
  • Klemens Nanni's avatar
    Fix C++ NULL shenanigans · 5d0a2b1a
    Klemens Nanni authored
    The type definition of `sptr_t' depends on the compiler and C++ standard
    being used, see external/scintilla/include/Scintilla.h and Scintilla's
    upstream commit "Change definition of uptr_t and sptr_t to use
    standardised types and headers"[0].
    
    On OpenBSD 6.5/amd64, Clang 7.0.1 defaults to C++14,  thus `NULL' is
    defined as `nullptr' so assigning it to `sptr_t' aka. `long' will fail.
    
    Fix all callers (to the legacy Scintilla code) by using zero:
    
    	/WndProc(/s,NULL,0,
    	/glBindBuffer(/s,NULL,0,
    	/glUseProgram(/s,NULL,0,
    
    0: https://github.com/mirror/scintilla/commit/91bbc3c933d663b3bc9f4572cf1ed02d77922fde
    
    
    Signed-off-by: default avatarGargaj <gargaj@conspiracy.hu>
    5d0a2b1a