Just some cosmetics.

This commit is contained in:
Johannes Findeisen 2026-10-03 01:40:13 +02:00
commit db7ea91463

View file

@ -1,6 +1,9 @@
# libooc
A tiny C library for object-oriented programming using ordinary C structs and function-pointer vtables. It provides object allocation, virtual destructors, intrusive reference counting, runtime class metadata, name-based field access, and a small interface header.
A tiny C library for object-oriented programming using ordinary C structs and
function-pointer vtables. It provides object allocation, virtual destructors,
intrusive reference counting, runtime class metadata, name-based field access,
and a small interface header.
## Build
@ -25,7 +28,8 @@ For packaging, `pkg` stages the same tree under `./pkg` without needing root:
make pkg
make clean-pkg
That is shorthand for `make DESTDIR="$PWD/pkg" PREFIX=/$(PREFIX) install`, and it honours an overridden prefix:
That is shorthand for `make DESTDIR="$PWD/pkg" PREFIX=/$(PREFIX) install`, and
it honours an overridden prefix:
make pkg PREFIX=/usr
@ -59,7 +63,7 @@ one through the same calls before putting all four objects through a single
`Animal *`. The output makes the point that is invisible in the source: one call
site reaches four implementations, and the vtable decides which.
make test # runs example/main.c
make example-test # runs example/main.c
make safety-test # runs the assertion suite in tests/
Objects are reference-counted with `ooc_retain()` and `ooc_release()`.
@ -68,7 +72,8 @@ The public installed header is:
#include <ooc/ooc.h>
Application-specific classes such as `Animal`, `Dog` and `Cat` are not installed by the library.
Application-specific classes such as `Animal`, `Dog` and `Cat` are not installed
by the library.
### Constructors down a chain
@ -308,7 +313,10 @@ threads. `ooc_retain()` returns NULL if the reference count cannot be incremente
## Portability
The library API is standard C and has no third-party dependencies. The supplied Makefile uses conventional POSIX/Unix build tools and produces both shared and static libraries. Other platforms can use the same source/API with their native build system if their shared-library conventions differ.
The library API is standard C and has no third-party dependencies. The supplied
Makefile uses conventional POSIX/Unix build tools and produces both shared and
static libraries. Other platforms can use the same source/API with their native
build system if their shared-library conventions differ.
## License