Skip to content

Commit 2211919

Browse files
committed
all compiles now
1 parent 7dc0706 commit 2211919

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ MAIN_HIGHER_EXE = $(patsubst $(SRCDIR)/main/higher-level/%.c, $(BINDIR)/%, $(MAI
106106
TEST_EXE = $(patsubst $(SRCDIR)/tests/%.c, $(BINDIR)/force-test/%, $(TEST_SRC))
107107

108108
# Dependencies
109-
DEP = $(CROSS_OBJ:.o=.d) $(LOWER_OBJ:.o=.d) $(HIGHER_OBJ:.o=.d) $(AUX_OBJ:.o=.d)
109+
DEPENDENCIES = $(CROSS_OBJ:.o=.d) $(LOWER_OBJ:.o=.d) $(HIGHER_OBJ:.o=.d) $(AUX_OBJ:.o=.d)
110110

111111
# Targets
112112
all: exe tests
@@ -119,7 +119,7 @@ dev: $(BINDIR)/force-stratified-sample # specific target for development
119119
#.PHONY: temp all install install_ bash python rstats misc external clean build check
120120

121121
# Include dependencies
122-
-include $(DEP)
122+
-include $(DEPENDENCIES)
123123

124124

125125
print-vars:
@@ -224,8 +224,7 @@ $(BINDIR)/%: $(SRCDIR)/main/lower-level/%.c $(CROSS_OBJ) $(LOWER_OBJ)
224224
@echo "Compiling $<..."
225225
$(CXX) $(CFLAGS) $(INCLUDES) $(FLAGS) -o $@ $^ $(LIBS)
226226

227-
#$(BINDIR)/%: $(SRCDIR)/main/higher-level/%.c $(CROSS_OBJ) $(HIGHER_OBJ)
228-
$(BINDIR)/%: $(MAIN_HIGHER_EXE) $(CROSS_OBJ) $(HIGHER_OBJ)
227+
$(BINDIR)/%: $(SRCDIR)/main/higher-level/%.c $(CROSS_OBJ) $(HIGHER_OBJ)
229228
@echo "Compiling $<..."
230229
$(CXX) $(CFLAGS) $(INCLUDES) $(FLAGS) -o $@ $^ $(LIBS)
231230

misc/force-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.12-dev:::2024-10-24_07:32:25
1+
3.7.12-dev:::2024-10-24_13:09:57
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/modules/higher-level/py-udf-hl.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ par_udf_t *udf;
7575
} else if (phl->udf.pyp.out){
7676
udf = &phl->udf.pyp;
7777
} else {
78-
return;
78+
exit(FAILURE);
7979
}
8080

8181

8282
Py_Initialize();
8383

84-
import_array();
84+
if (_import_array() < 0) {
85+
PyErr_Print();
86+
PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import");
87+
exit(FAILURE);
88+
}
8589

8690
PyRun_SimpleString("from multiprocessing.pool import Pool");
8791
PyRun_SimpleString("import numpy as np");
@@ -548,7 +552,7 @@ short* return_ = NULL;
548552
py_nproc,
549553
NULL);
550554

551-
if (py_return == Py_None){
555+
if ((PyObject*)py_return == Py_None){
552556
printf("None returned from python. Check the python UDF code!\n");
553557
exit(FAILURE);}
554558

0 commit comments

Comments
 (0)