소스 검색

Fix build with python 3

Kartik Mohta 7 년 전
부모
커밋
037022be2b
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      matplotlibcpp.h

+ 5 - 1
matplotlibcpp.h

@@ -72,15 +72,19 @@ namespace matplotlibcpp {
 			}
 
 			private:
+#ifndef WITHOUT_NUMPY
 #if PY_MAJOR_VERSION >= 3
-			int import_numpy() {
+			void *import_numpy() {
 				import_array(); // initialize C-API
+				return NULL;
 			}
 #else
 			void import_numpy() {
 				import_array(); // initialize C-API
 			}
 #endif
+#endif
+
 			_interpreter() {
 
                 // optional but recommended