• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kivy / pyobjus / 40239834577
72%

Build:
DEFAULT BRANCH: master
Ran 25 Oct 2026 10:22PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Oct 2026 10:21PM UTC coverage: 51.471%. Remained the same
40239834577

push

github

web-flow
Size struct arguments from the prepared libffi types (#166)

* Size struct arguments from the prepared libffi types

ObjcMethod.__call__ sized each struct argument by building a ctypes class
from its signature with Factory.make_type, on every call. Call
ensure_method() before converting the arguments instead: it already caches
the ffi_types per signature, and ffi_prep_cif lays out struct types,
including nested ones, so the loop can read every argument's size from
f_arg_types.

This removes the per-call class construction (an NSEdgeInsets argument
goes from about 64 to 54 us per call, the same as a call without a struct),
and argument sizing no longer depends on make_type, so structs that contain
other structs can be passed by value.

Since #157, passing a struct with bit fields by value failed with a bare
KeyError: 'b' from make_type. It now raises ObjcException("Bit fields
aren't supported in pyobjus!") again, from ensure_method(), before any
argument is converted. Adds Car.useBitField: to the test library and a test
for that error.

The pointer-size floor now applies only when the argument is None, which is
passed as a nil pointer. A real struct smaller than a pointer was copied
with the floor size, reading past the end of the ctypes object.

* Cache the method signature only after ffi_prep_cif succeeds

ensure_method() stored signature_current_args before building the arg
types, so a call rejected for a bit field or a union by value left a
half-built f_arg_types that the next call with the same signature used
without preparing. Also prepare the method before allocating f_args, so
a rejected call no longer leaks it.

---------

Co-authored-by: Elliot Garbus <elliotgarbus@Elliots-MacBook-Pro.local>

140 of 272 relevant lines covered (51.47%)

0.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40239834577.1 25 Oct 2026 10:22PM UTC 6
51.47
GitHub Action Run
Source Files on build 40239834577
  • Tree
  • List 6
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40239834577
  • cd4a5e3e on github
  • Prev Build on master (#40177918937)
  • Next Build on master (#40417158778)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc