{"id":17987248,"url":"https://github.com/justinmeiners/c-foundation","last_synced_at":"2025-10-08T22:36:02.829Z","repository":{"id":8403108,"uuid":"9984852","full_name":"justinmeiners/c-foundation","owner":"justinmeiners","description":"An implementation of an ANSI C class system similar to Apple's Core Foundation. (Retain/release, autorelease, mutable/immutable, etc)","archived":false,"fork":false,"pushed_at":"2017-07-11T19:23:27.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-13T14:45:16.934Z","etag":null,"topics":["apple","autorelease","c","cocoa","foundation","reference-counting"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinmeiners.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-10T15:58:38.000Z","updated_at":"2022-04-26T14:57:55.000Z","dependencies_parsed_at":"2022-07-21T12:18:21.148Z","dependency_job_id":null,"html_url":"https://github.com/justinmeiners/c-foundation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justinmeiners/c-foundation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmeiners%2Fc-foundation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmeiners%2Fc-foundation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmeiners%2Fc-foundation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmeiners%2Fc-foundation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinmeiners","download_url":"https://codeload.github.com/justinmeiners/c-foundation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmeiners%2Fc-foundation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272279391,"owners_count":24905884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","autorelease","c","cocoa","foundation","reference-counting"],"created_at":"2024-10-29T19:07:56.818Z","updated_at":"2025-10-08T22:35:57.775Z","avatar_url":"https://github.com/justinmeiners.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c-foundation\n\n## About\n\nThis project provides a basic implementation of the C Object/Class system (think CGImageRef) found in Apple's Core Foundation and Core Graphics frameworks.\n\nThe object system used in these frameworks offers several key features that can be a big help in building a great C API.\n\n* Memory management with reference counting.\n* Full object encapsulation. (Clean headers!)\n* Mutable and immutable objects.\n* Polymorphic methods for core operations (retain, release, autorelease, copy, etc).\n\n## Example \n\nA simplified string and array class are included to demonstrate the object system.\n\n```C\n\n// Create a mutable object\nISMutableStringRef mutable = ISStringCreateMutable(\"a mutable string\", ISASCIIStringEncoding);\nISStringRef string = ISStringCreate(\"a static string\", ISASCIIStringEncoding);\n\n// functions work on both mutable and nonmutable objects\nint stringLength = ISStringLength(string);\n\nint length = ISStringLength(mutable);\n\n// certain functions only work on mutable objects\nISStringReplaceCharacters(mutable, 's', 'q');\n\n// release\nISRelease(string);\n\n```\n\n## Project License\n\nMIT License\n\nCopyright (c) 2017 Justin Meiners\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinmeiners%2Fc-foundation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinmeiners%2Fc-foundation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinmeiners%2Fc-foundation/lists"}