Skip to content

Detecting pointer behavior resolves data copying issues.#8901

Merged
joa-quim merged 2 commits intoGenericMappingTools:masterfrom
Chuan1937:grdpaste
Feb 14, 2026
Merged

Detecting pointer behavior resolves data copying issues.#8901
joa-quim merged 2 commits intoGenericMappingTools:masterfrom
Chuan1937:grdpaste

Conversation

@Chuan1937
Copy link
Member

In gmtapi_import_grid (within the GMT_IS_REFERENCE|GMT_VIA_MATRIX branch), check whether the data pointer has been redirected. If redirected, copy data row-by-row to the target location; otherwise, retain the original behavior.

Fixes #8899

@Chuan1937
Copy link
Member Author

@seisman
I attempted to resolve this issue. For this issue, I tested both gmt and pygmt and achieved success. However, I am unaware of gmt's other test scenarios. Please review.

@ES-Solar
Copy link
Contributor

I'll take a look at the other tests

@joa-quim
Copy link
Member

No need to keep merging master in the PR branches.
And I still hadn't opportunity to test this, which I must since it may impact GMT.jl/MEX.

@ES-Solar
Copy link
Contributor

I don't see any additional test failures relative to the upstream/master.

@joa-quim
Copy link
Member

Messing with virtual files may have important impacts on the wrappers. Only them may test this as well.

@seisman
Copy link
Member

seisman commented Feb 14, 2026

This PR works well for PyGMT tests.

Copy link
Member

@joa-quim joa-quim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All clear from GMT.jl too.

@joa-quim joa-quim merged commit 063c5c9 into GenericMappingTools:master Feb 14, 2026
9 of 13 checks passed
@Chuan1937 Chuan1937 deleted the grdpaste branch February 15, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GMT_Open_VirtualFile return all 0.0

4 participants