{"id":46879329,"url":"https://github.com/joelkp/scoop","last_synced_at":"2026-03-10T21:01:19.086Z","repository":{"id":12333677,"uuid":"14973510","full_name":"joelkp/scoop","owner":"joelkp","description":"SCOOP: Simple C library for Object-Oriented Programming  (2013 proof-of-concept library)","archived":false,"fork":false,"pushed_at":"2022-11-30T01:58:14.000Z","size":102,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-06T18:52:13.232Z","etag":null,"topics":["c","object-oriented-c","object-oriented-programming"],"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/joelkp.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-12-06T03:59:44.000Z","updated_at":"2023-02-03T16:17:38.000Z","dependencies_parsed_at":"2023-01-11T18:18:04.147Z","dependency_job_id":null,"html_url":"https://github.com/joelkp/scoop","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/joelkp/scoop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkp%2Fscoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkp%2Fscoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkp%2Fscoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkp%2Fscoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelkp","download_url":"https://codeload.github.com/joelkp/scoop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelkp%2Fscoop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30355223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","object-oriented-c","object-oriented-programming"],"created_at":"2026-03-10T21:00:52.261Z","updated_at":"2026-03-10T21:01:19.047Z","avatar_url":"https://github.com/joelkp.png","language":"C","readme":"SCOOP: Simple C library for Object-Oriented Programming\n=======================================================\n\nSCOOP is a Simple C library for Object-Oriented Programming.\nThe aim was for it to provide lightweight support for object-oriented APIs\nthat are structured similarly some older single inheritance C++ codebases,\nbut in plain C, with minimal verbosity.\n\nThis library was made in 2013, as a clean repackaging of experimenting in\n2010-2011. A 2022 [article on such object-oriented C](https://joelkp.frama.io/blog/c-struct-inherit.html)\ndescribes the ideas and some basic gotchas to keep in mind about the approach.\nCurrently, this proof-of-concept library is not actively developed further,\nbut if of interest further work could go into it. It would probably be more\nuseful to take a look at the ideas it contains and, given the small size of\nit all, to cook up something adapted for your particular project, which may\nmake use of some elements of SCOOP's approach.\n\nThe approach is one of providing some simple routines, along with using the\nC preprocessor. Anything that can't be implemented so as to be usable with\ngreat brevity and small overhead is purposefully left out,\nincluding multiple inheritance.\n\nThe core of the library is the Object module, which provides support for:\n- Class declaration and definition\n- Single inheritance (by direct inclusion of the members of the supertype\n  into the subtype)\n- Virtual functions\n- Explicit RTTI checks\n\nSee the header files for the library for further details. The library can be built with `make` on many GNU/Linux systems, and with `gmake` on BSDs.\n\nBranches and C and C++ compatibility\n------------------------------------\n\nOriginally, the library was designed to be able to coexist with C++ code easily. Thus, it mainly uses ANSI C (C89) features, and some C99 features that don't conflict with C++. (It also relies on some undefined behavior generally working just fine.)\n\nA subset of the library which compiles fine with `-std=c89 -pedantic` options can be found in the git `c89` branch. This subset has exactly the features of the 2013 version.\n\nCompared to the `c89` version, the main version is changed to use mainly C99 macro features for somewhat greater ease of use.\n\nLicensing\n---------\n\nSCOOP is distributed under the MIT license below.\nThe following copyright notice applies to SCOOP as a whole.\n\nCopyright (c) 2010, 2011, 2013, 2022 Joel K. Pettersson.\n\n\"Permission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\"\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelkp%2Fscoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelkp%2Fscoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelkp%2Fscoop/lists"}