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

Add bindings for `CFBundleGetMainBundle()`, `CFBundleGetInfoDictionary()`, and `CFDictionarySetValue()`. #81

Merged
merged 2 commits into from May 16, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add bindings for `CFDictionarySetValue()`.

  • Loading branch information
pcwalton committed May 16, 2016
commit 3e5f2a5efe42a1dc8d199b6807e6ba6615d73cfe
@@ -63,4 +63,7 @@ extern {
pub fn CFDictionaryGetTypeID() -> CFTypeID;
pub fn CFDictionaryGetValueIfPresent(theDict: CFDictionaryRef, key: *const c_void, value: *mut *const c_void)
-> Boolean;
pub fn CFDictionarySetValue(theDict: CFDictionaryRef,
key: *const c_void,
value: *const c_void);
}
@@ -96,4 +96,9 @@ impl CFDictionary {
let value: CFTypeRef = mem::transmute(self.get(key));
TCFType::wrap_under_get_rule(value)
}

#[inline]
pub unsafe fn set_value(&self, key: *const c_void, value: *const c_void) {
CFDictionarySetValue(self.0, key, value)
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.