We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4724 - Implement SDL_memset4 using memset_pattern4 on macOS
Summary: Implement SDL_memset4 using memset_pattern4 on macOS
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: don't know
Hardware: x86_64 macOS 10.14
: P2 enhancement
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.12
Depends on:
Blocks:
 
Reported: 2019-07-18 00:16 UTC by Indiana Kernick
Modified: 2019-09-20 20:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Indiana Kernick 2019-07-18 00:16:52 UTC
memset_pattern4/8/16 is a Darwin extension available in the string.h header. It is available on macOS 10.5+ and iOS 3.0+. Its signature is below:

void memset_pattern4(void *__b, const void *__pattern4, size_t __len);

__pattern4 is a pointer to 4 bytes and __len is the number of bytes to set. This is probably faster than the current implementation of SDL_memset4.

I’m not too sure how to check for the existence of this function but this might be a start:

__DARWIN_C_LEVEL >= __DARWIN_C_FULL
Comment 1 Ryan C. Gordon 2019-07-30 17:49:35 UTC
(Sorry if you get several emails like this, we're marking a bunch of bugs.)

We're hoping to ship SDL 2.0.11 on a much shorter timeframe than we have historically done releases, so I'm starting to tag bugs we hope to have closed in this release cycle.

Note that this tag means we just intend to scrutinize this bug for the 2.0.11 release: we may fix it, reject it, or even push it back to a later release for now, but this helps give us both a goal and a wishlist for the next release.

If this bug has been quiet for a few months and you have new information (such as, "this is definitely still broken" or "this got fixed at some point"), please feel free to retest and/or add more notes to the bug.

--ryan.
Comment 2 Ryan C. Gordon 2019-09-04 04:41:27 UTC
> I’m not too sure how to check for the existence of this function but this might be a start:

I just check for __APPLE__; it's been available since 10.5 and basically always on the iPhone, so that's good enough.


This is in https://hg.libsdl.org/SDL/rev/ed80f97ebe81

--ryan.
Comment 3 Ryan C. Gordon 2019-09-20 20:47:34 UTC
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.
Comment 4 Ryan C. Gordon 2019-09-20 20:48:41 UTC
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.