Allow static implementation

Aperta
#304 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c

Direzione di ricerca

Start in qoi.h and compare the linked fork's implementation, paying attention to how declarations and definitions are used by qoiconv and qoibench. Done means a configurable storage-class specifier can make the implementation static without breaking those consumers; check the resulting behavior and binary sizes against the issue's examples.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

From stb_howto:

Have a #define which makes function declarations and function definitions static.

Being able to add storage-class specifiers is not only useful in the context mentioned in the linked docs, but also for creating a static library that uses qoi.h but doesn't expose its symbols (see raysan5/raylib#4207), and may allow a compiler to generate better code.

For example, having implemented it in a fork and using it (and STBIDEF) in qoiconv and qoibench had their sizes drop drastically (from 216k and 234k to 75k and 109k respectively).

Lingua principale
C
Stelle
7.6k
Fork
383
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phoboslab/qoi

Tutte le issue di phoboslab/qoi

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.