Skip to content

Remove AudioCVT, remove CVec from audio #2

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

Merged
merged 8 commits into from
Jan 7, 2015
Merged

Conversation

nukep
Copy link

@nukep nukep commented Jan 7, 2015

CVec is removed from the audio system completely, as detailed in issue Rust-SDL2#267.

While attempting to write a unit test for AudioCVT, I was running into weird buffer-overflow issues. Instead of fighting with it, I removed it for now.

AudioSpecWAV now owns the audio buffer, and is freed on drop().
I also took the liberty to add an integration test for AudioSpecWAV, in order to test that it actually works. :)

Enjoy!

drbawb and others added 8 commits January 7, 2015 07:57
* CString has moved to `std::ffi` and has a new interface.
* CVec has been removed entirely.
Working with `*const c_char` now works as follows:

* Call `c_str_to_bytes(*const char)` helper function to get a slice
  of data w/o the null terminator. (`&'a [u8]`)

* Use that slice of data to construct a standard `String` using the
  checked, unchecked, or lossy UTF-8 conversion methods.

---

CString now only exists to go the other way (from String -> CString).
It simply adds the invariants that the string contains no interior NULL
bytes and has a null-terminator.
Unnecessary / incorrect imports because it's not being built in-tree.
* Several feature gates have been added to the language, yay!
* raw_pointer_deriving -> raw_pointer_derive
* #![macro_escape] -> #[macro_use]
drbawb added a commit that referenced this pull request Jan 7, 2015
Merge CString fixes, Remove AudioCVT, remove CVec from audio
@drbawb drbawb merged commit 891471e into drbawb:master Jan 7, 2015
@nukep nukep deleted the fix-libc branch January 7, 2015 22:34
@drbawb drbawb mentioned this pull request Jan 7, 2015
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.

2 participants