Skip to content

(core::str) Fixing index and rindex #1812

New issue

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

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

Already on GitHub? # to your account

Merged
merged 6 commits into from
Feb 12, 2012
Merged

Conversation

killerswan
Copy link
Contributor

These commits make index and rindex return character positions of a matched char (rather than byte positions), and use option::none rather than -1 to indicate a character not found.

brson added a commit that referenced this pull request Feb 12, 2012
(core::str) Fixing index and rindex
@brson brson merged commit 737db5b into rust-lang:master Feb 12, 2012
celinval added a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Declare the function signatures instead of importing system definitions. This avoids conflict between our pre-build libraries and the C files that are built on the user machine.

Also remove the gen_c_lib.c file which seems to be dead code.
jaisnan pushed a commit to jaisnan/rust-dev that referenced this pull request Jul 29, 2024
In rust-lang#1812 we removed standard library includes and instead provided
forward declarations of `free`, `calloc`, and `memcpy` -- but seemingly
forgot to include `malloc`, which we also use.

This avoids a warning seen when dialling up `goto-cc` verbosity.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants