From 773bd1a90a4ac2e5c5eb86934d35571ed184cf56 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Wed, 18 Dec 2024 21:48:48 +0100 Subject: [PATCH] Rename Mat::clone binding because it is used in Emscripten. This is in emscripten 3.1.71 and above, cf https://github.com/emscripten-core/emscripten/pull/22734 There was a temptative fix upstream to no avail: https://github.com/emscripten-core/emscripten/pull/23132 --- modules/js/src/core_bindings.cpp | 2 +- modules/js/test/test_mat.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/js/src/core_bindings.cpp b/modules/js/src/core_bindings.cpp index d5bf9b076c6c..361a76fd5485 100644 --- a/modules/js/src/core_bindings.cpp +++ b/modules/js/src/core_bindings.cpp @@ -520,7 +520,7 @@ EMSCRIPTEN_BINDINGS(binding_utils) .function("colRange", select_overload(&cv::Mat::colRange)) .function("colRange", select_overload(&cv::Mat::colRange)) .function("step1", select_overload(&cv::Mat::step1)) - .function("clone", select_overload(&cv::Mat::clone)) + .function("mat_clone", select_overload(&cv::Mat::clone)) .function("depth", select_overload(&cv::Mat::depth)) .function("col", select_overload(&cv::Mat::col)) .function("dot", select_overload(&binding_utils::matDot)) diff --git a/modules/js/test/test_mat.js b/modules/js/test/test_mat.js index a1d5c98b1793..f0c52115688a 100644 --- a/modules/js/test/test_mat.js +++ b/modules/js/test/test_mat.js @@ -173,7 +173,7 @@ QUnit.test('test_mat_creation', function(assert) { // clone { let mat = cv.Mat.ones(5, 5, cv.CV_8UC1); - let mat2 = mat.clone(); + let mat2 = mat.mat_clone(); assert.equal(mat.channels, mat2.channels); assert.equal(mat.size().height, mat2.size().height);