File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ extern "C" {
3939#define _GENERATE_DEBUG_SECTION_APPLE (name )
4040#endif
4141
42- #if ( defined(__linux__ ) && (defined(__GNUC__ ) || defined( __clang__ ))) || (defined( MS_WINDOWS ) && defined(__clang__ ))
42+ #if defined(__linux__ ) && (defined(__GNUC__ ) || defined(__clang__ ))
4343#define _GENERATE_DEBUG_SECTION_LINUX (name ) \
4444 __attribute__((section("." Py_STRINGIFY(name)))) \
4545 __attribute__((used))
Original file line number Diff line number Diff line change @@ -548,12 +548,7 @@ get_py_runtime(proc_handle_t* handle)
548548
549549#ifdef MS_WINDOWS
550550 // On Windows, search for 'python' in executable or DLL
551- #ifdef __clang__
552- const char * secname = "_PyRuntime" ;
553- #else
554- const char * secname = "PyRuntime" ;
555- #endif
556- address = search_windows_map_for_section (handle , secname , L"python" );
551+ address = search_windows_map_for_section (handle , "PyRuntime" , L"python" );
557552 if (address == 0 ) {
558553 // Error out: 'python' substring covers both executable and DLL
559554 PyErr_SetString (PyExc_RuntimeError , "Failed to find the PyRuntime section in the process." );
You can’t perform that action at this time.
0 commit comments