Skip to content

MNT Fix Pyodide build errors due to incompatible function pointer types #25831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sklearn/svm/_liblinear.pxi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cdef extern from "_cython_blas_helpers.h":
ctypedef double (*dot_func)(int, double*, int, double*, int)
ctypedef void (*axpy_func)(int, double, double*, int, double*, int)
ctypedef void (*scal_func)(int, double, double*, int)
ctypedef double (*nrm2_func)(int, double*, int)
ctypedef double (*dot_func)(int, const double*, int, const double*, int)
ctypedef void (*axpy_func)(int, double, const double*, int, double*, int)
ctypedef void (*scal_func)(int, double, const double*, int)
ctypedef double (*nrm2_func)(int, const double*, int)
cdef struct BlasFunctions:
dot_func dot
axpy_func axpy
Expand Down
2 changes: 1 addition & 1 deletion sklearn/svm/_libsvm.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Includes
cdef extern from "_svm_cython_blas_helpers.h":
ctypedef double (*dot_func)(int, double*, int, double*, int)
ctypedef double (*dot_func)(int, const double*, int, const double*, int)
cdef struct BlasFunctions:
dot_func dot

Expand Down
2 changes: 1 addition & 1 deletion sklearn/svm/_libsvm_sparse.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cdef extern from *:
# Includes

cdef extern from "_svm_cython_blas_helpers.h":
ctypedef double (*dot_func)(int, double*, int, double*, int)
ctypedef double (*dot_func)(int, const double*, int, const double*, int)
cdef struct BlasFunctions:
dot_func dot

Expand Down
8 changes: 4 additions & 4 deletions sklearn/svm/src/liblinear/_cython_blas_helpers.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef _CYTHON_BLAS_HELPERS_H
#define _CYTHON_BLAS_HELPERS_H

typedef double (*dot_func)(int, double*, int, double*, int);
typedef void (*axpy_func)(int, double, double*, int, double*, int);
typedef void (*scal_func)(int, double, double*, int);
typedef double (*nrm2_func)(int, double*, int);
typedef double (*dot_func)(int, const double*, int, const double*, int);
typedef void (*axpy_func)(int, double, const double*, int, double*, int);
typedef void (*scal_func)(int, double, const double*, int);
typedef double (*nrm2_func)(int, const double*, int);

typedef struct BlasFunctions{
dot_func dot;
Expand Down
2 changes: 1 addition & 1 deletion sklearn/svm/src/libsvm/_svm_cython_blas_helpers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _SVM_CYTHON_BLAS_HELPERS_H
#define _SVM_CYTHON_BLAS_HELPERS_H

typedef double (*dot_func)(int, double*, int, double*, int);
typedef double (*dot_func)(int, const double*, int, const double*, int);
typedef struct BlasFunctions{
dot_func dot;
} BlasFunctions;
Expand Down