File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -527,11 +527,11 @@ def collect_cc(info_add):
527527
528528def collect_gdbm (info_add ):
529529 try :
530- import _gdbm
530+ from _gdbm import _GDBM_VERSION
531531 except ImportError :
532532 return
533533
534- info_add ('gdbm.GDBM_VERSION' , '.' .join (map (str , _gdbm . _GDBM_VERSION )))
534+ info_add ('gdbm.GDBM_VERSION' , '.' .join (map (str , _GDBM_VERSION )))
535535
536536
537537def collect_info (info ):
Original file line number Diff line number Diff line change @@ -678,6 +678,7 @@ PyInit__gdbm(void) {
678678 goto error ;
679679 }
680680
681+ #if defined(GDBM_VERSION_MAJOR ) && defined(GDBM_VERSION_MINOR ) && defined(GDBM_VERSION_PATCH )
681682 PyObject * obj = Py_BuildValue ("iii" , GDBM_VERSION_MAJOR ,
682683 GDBM_VERSION_MINOR , GDBM_VERSION_PATCH );
683684 if (obj == NULL ) {
@@ -687,6 +688,7 @@ PyInit__gdbm(void) {
687688 Py_DECREF (obj );
688689 goto error ;
689690 }
691+ #endif
690692
691693 return m ;
692694
You can’t perform that action at this time.
0 commit comments