Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Updated test snapshot fixtures (`issue_039_opaque_struct.test`, `keywords.test`, `array_dimensions.test`, `simple_c.expected.pxd`, and `json_lib.expected.pxd`) to reflect HeaderKit 0.46.1+ struct/variable ordering, `ctypedef struct` opaque struct typedef semantics, and topological dependency sort order.

## [4.0.0] - 2026-10-18

### Added
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ classifiers = [
requires-python = ">=3.11"
dependencies = [
"Click",
"headerkit>=0.46.0,<1.0.0",
"headerkit>=0.46.2,<1.0.0",
]

[project.optional-dependencies]
# libclang backend (C++ support) - headerkit vendors clang bindings, kept for backwards compatibility
libclang = []
# tree-sitter backend - headerkit owns the tree-sitter dependency set
treesitter = ["headerkit[treesitter]>=0.46.0,<1.0.0"]
treesitter = ["headerkit[treesitter]>=0.46.2,<1.0.0"]

# Testing
# tree-sitter is included so the default dev install exercises both backends
Expand Down
11 changes: 5 additions & 6 deletions test/fixtures/realistic_headers/json_lib.expected.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cdef extern from "json_lib.h":




int JSON_COMPACT

int JSON_ENSURE_ASCII
Expand All @@ -21,7 +20,7 @@ cdef extern from "json_lib.h":
JSON_FALSE
JSON_NULL

cdef struct json_t
ctypedef struct json_t


ctypedef struct json_error_t:
Expand All @@ -34,10 +33,6 @@ cdef extern from "json_lib.h":

int JSON_INDENT(int n)

const char* json_object_iter_key(void* iter)

json_type json_typeof(const json_t* json)

int json_is_object(const json_t* json)

int json_is_array(const json_t* json)
Expand Down Expand Up @@ -92,6 +87,8 @@ cdef extern from "json_lib.h":

void* json_object_iter_next(json_t* object, void* iter)

const char* json_object_iter_key(void* iter)

json_t* json_object_iter_value(void* iter)

unsigned long json_object_size(const json_t* object)
Expand Down Expand Up @@ -125,3 +122,5 @@ cdef extern from "json_lib.h":
char* json_dumps(const json_t* json, unsigned long flags)

int json_dumpf(const json_t* json, void* output, unsigned long flags)

json_type json_typeof(const json_t* json)
5 changes: 3 additions & 2 deletions test/real_headers/simple_c.expected.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ cdef extern from "simple_c.h":
LOG_WARN
LOG_ERROR

int global_debug_enabled


cdef struct Point:
int x
Expand All @@ -36,6 +34,9 @@ cdef extern from "simple_c.h":
unsigned int capacity


int global_debug_enabled


Point point_create(int x, int y)

int point_distance(Point a, Point b)
Expand Down
5 changes: 1 addition & 4 deletions test/regressions/cases/issue_039_opaque_struct.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ void destroy_handle(opaque_handle* h);
---
cdef extern from "issue_039_opaque_struct.test":



cdef struct opaque_handle

ctypedef struct opaque_handle

opaque_handle* create_handle()

Expand Down
1 change: 1 addition & 0 deletions test/test_files/array_dimensions.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cdef extern from "array_dimensions.test":
TWO
THREE


char* my_ptr_array[]

int my_array[5][6]
Expand Down
9 changes: 5 additions & 4 deletions test/test_files/keywords.test
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ cdef extern from "keywords.test":



False_** lambda_ "lambda"

cdef enum try_ "try":
del_ "del"
and_ "and"
Expand All @@ -61,8 +59,6 @@ cdef extern from "keywords.test":
ZERO
ONE

False_ yield_ "yield"[1][0]


cdef struct class_ "class":
int finally_ "finally"
Expand All @@ -75,6 +71,11 @@ cdef extern from "keywords.test":
void (*import_ "import")(int yield_)


False_** lambda_ "lambda"

False_ yield_ "yield"[1][0]


void True_ "True"(def_ from_)

False_* pass_ "pass"(None_ except_, in_ raise_)
Loading