{"id":4809,"date":"2012-05-07T15:49:13","date_gmt":"2012-05-07T20:49:13","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=4809"},"modified":"2012-05-07T15:49:17","modified_gmt":"2012-05-07T20:49:17","slug":"bools-sharp-corners","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/05\/07\/bools-sharp-corners\/","title":{"rendered":"BOOL&rsquo;s Sharp Corners"},"content":{"rendered":"<p><a href=\"http:\/\/weblog.bignerdranch.com\/564-bools-sharp-corners\/\">Mark Dalrymple<\/a>:<\/p>\n<blockquote cite=\"http:\/\/weblog.bignerdranch.com\/564-bools-sharp-corners\/\"><p>If <code>g_name<\/code> is non-<code>nil<\/code>, it&#8217;s a true value, so this function will be returning a true value.  It might not be <code>YES<\/code>, but truth is truth in C, isn&#8217;t it?  If this function returned <code>bool<\/code>, it would return the correct value.<\/p>\n<p>Unfortunately, with <code>BOOL<\/code>, it doesn&#8217;t.  If the address happens to have a zero lower byte, this function will return zero due to the same slicing behavior.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Mark Dalrymple: If g_name is non-nil, it&#8217;s a true value, so this function will be returning a true value. It might not be YES, but truth is truth in C, isn&#8217;t it? If this function returned bool, it would return the correct value. Unfortunately, with BOOL, it doesn&#8217;t. If the address happens to have a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-4809","post","type-post","status-publish","format-standard","hentry","category-programming-category"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=4809"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4809\/revisions"}],"predecessor-version":[{"id":4811,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4809\/revisions\/4811"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=4809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=4809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=4809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}