Skip to content
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

Rename malloc to jmalloc etc #1337

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Add JUCE_NO_DEPRECATED_HEAPBLOCK_METHODS to optionally remove depreca…
…ted HeapBlock methods
  • Loading branch information
abrykt committed Jan 26, 2024
commit 68c1d45407561eac14ab782cda2e464a77dc7c83
4 changes: 4 additions & 0 deletions modules/juce_core/memory/juce_HeapBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ class HeapBlock
data = nullptr;
}

#ifndef JUCE_NO_DEPRECATED_HEAPBLOCK_METHODS

template <typename SizeType>
[[deprecated]] void malloc(SizeType newNumElements, size_t elementSize = sizeof(ElementType)) {
return jmalloc(newNumElements, elementSize);
Expand Down Expand Up @@ -326,6 +328,8 @@ class HeapBlock
jfree();
}

#endif

/** Swaps this object's data with the data of another HeapBlock.
The two objects simply exchange their data pointers.
*/
Expand Down