Skip to content

Latest commit

 

History

History

libjudy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Bundled libJudy

This directory contains a subset of the upstream Judy-1.0.5 sources, bundled so php-judy can build without a system libJudy. License: LGPL-2.1-or-later — see COPYING (upstream's file, verbatim) and the root THIRD-PARTY.md.

Provenance

What was imported

  • COPYING — upstream LGPL-2.1 license text
  • src/Judy.h — public API header
  • src/JudyCommon/ — the complete shared engine: every *.c and *.h in the directory, including JudyPrintJP.c (a debug/trace helper #included by JudyGet/JudyIns/JudyDel/JudyPrevNextEmpty under trace ifdefs, so it is not dead code)
  • src/Judy1/Judy1.h, src/JudyL/JudyL.h — per-variant internal headers
  • src/JudySL/JudySL.c, src/JudyHS/JudyHS.c — string-keyed layers

What was deliberately excluded

  • Upstream autotools/build files (configure, Makefile.am/.in, aclocal.m4, bootstrap, libtool helpers) — php-judy wires these sources into its own build system instead
  • doc/, test/, tool/, src/apps/, per-directory READMEs, build.bat, sh_build, Judy.h.check.c
  • src/JudyHS/JudyHS.h — a standalone compatibility header for pre-JudyHS Judy.h; nothing includes it (the #include in JudyHS.c is commented out upstream)
  • Upstream's build-time-generated Judy1/JudyL wrapper sources and size-class tables — php-judy ships its own clearly-marked equivalents instead: the build shims under src/wrappers/ and the pre-generated src/Judy1/Judy1Tables.c / src/JudyL/JudyLTables.c (see the provenance headers in those files)

Modifications

Every change to these sources is documented in PATCHES.md and available as a git diff against the pristine import commit; that table is the authoritative, current list. Files added by php-judy (wrappers, pre-generated tables) are additions, not modifications — see PATCHES.md.

Build integration

These sources are the default build (--with-judy absent, yes or bundled): config.m4/config.w32 compile them into the extension directly. --with-judy=DIR instead links against a system libJudy and compiles nothing under this directory. The vendored units are compiled at -O2 -fno-lto -fno-unroll-loops only — never -O3/LTO/loop unrolling — and the flags are attached per-source so the extension's own optimization flags cannot leak in (see #131; measured on gcc 13/14, -funroll-loops at any -O level makes gcc exploit the out-of-bounds immediate copy and silently lose keys, so these flags are load-bearing for correctness).